empty arguments lost in EDITOR
Bug #1089792 reported by
Ross Lagerwall
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Ross Lagerwall | ||
2.5 |
Fix Released
|
High
|
Ross Lagerwall |
Bug Description
I have my EDITOR='emacsclient -a "" -t'.
When it comes to commit, bzr does not invoke the editor correctly. It invokes it as 'emacsclient -a "-t"'.
To reproduce this, first create a simple script which shows the arguments given to it:
$ cat - > /tmp/args
#!/usr/bin/python2
import sys
for i in sys.argv:
print "'%s'" % i
EOF
$ chmod +x /tmp/args
$ export EDITOR='/tmp/args -a "" -t'
$ bzr commit
Committing to: /tmp/repo/
...
'/tmp/args'
'-a'
'-t'
'/tmp/bzr_
You can see that the arguments are incorrect, it should be something like:
Committing to: /tmp/repo/
...
'/tmp/args'
'-a'
''
'-t'
'/tmp/bzr_
Related branches
lp://staging/~rosslagerwall/bzr/cmdline-empty-quotes
- Richard Wilbur: Approve
-
Diff: 26 lines (+5/-0)2 files modifiedbzrlib/cmdline.py (+1/-0)
bzrlib/tests/test_cmdline.py (+4/-0)
lp://staging/~vila/bzr/cmdline-empty-quotes-2.5
- bzr-core: Pending requested
-
Diff: 40 lines (+8/-0)3 files modifiedbzrlib/cmdline.py (+1/-0)
bzrlib/tests/test_cmdline.py (+4/-0)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
- Vincent Ladeuil: Approve
-
Diff: 40 lines (+8/-0)3 files modifiedbzrlib/cmdline.py (+1/-0)
bzrlib/tests/test_cmdline.py (+4/-0)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
Changed in bzr: | |
assignee: | nobody → Ross Lagerwall (rosslagerwall) |
summary: |
- bzr invokes incorrect command + empty arguments lost in EDITOR |
Changed in bzr: | |
status: | Triaged → Fix Released |
Changed in bzr: | |
milestone: | 2.6b3 → 2.6.0 |
To post a comment you must log in.
Which version of bzr are you running? Here's what I get when I try the test case: ordinate: ~/src/bzr_ test$ bzr status ordinate: ~/src/bzr_ test$ export EDITOR= '/home/ rwilbur/ src/bzr_ test/args -a "" -t' ordinate: ~/src/bzr_ test$ printf "%s\n" $EDITOR src/bzr_ test/args ordinate: ~/src/bzr_ test$ bzr commit src/bzr_ test/ rwilbur/ src/bzr_ test/args' (empty commit message specified) ordinate: ~/src/bzr_ test$ bzr --version
rwilbur@
added:
args
rwilbur@
rwilbur@
/home/rwilbur/
-a
""
-t
rwilbur@
Committing to: /home/rwilbur/
added args
'/home/
'-a'
'""'
'-t'
'bzr_log.8Edb8D'
aborting commit write group: BzrCommandError
bzr: ERROR: empty commit message specified
rwilbur@
Bazaar (bzr) 2.1.4