Merge lp:~vila/bzr/cmdline-empty-quotes-2.5 into lp:bzr/2.5

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6514
Proposed branch: lp:~vila/bzr/cmdline-empty-quotes-2.5
Merge into: lp:bzr/2.5
Diff against target: 40 lines (+8/-0)
3 files modified
bzrlib/cmdline.py (+1/-0)
bzrlib/tests/test_cmdline.py (+4/-0)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
To merge this branch: bzr merge lp:~vila/bzr/cmdline-empty-quotes-2.5
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+165849@code.launchpad.net

Commit message

Empty arguments in EDITOR are now properly preserved.

Description of the change

Backporting to 2.5 fix for empty arguments in EDITOR (bug #1089792).

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/cmdline.py'
2--- bzrlib/cmdline.py 2011-12-19 13:23:58 +0000
3+++ bzrlib/cmdline.py 2013-05-27 09:52:27 +0000
4@@ -72,6 +72,7 @@
5 if next_char == u'\\':
6 return _Backslash(self)
7 elif next_char == self.quote_char:
8+ context.token.append(u'')
9 return self.exit_state
10 else:
11 context.token.append(next_char)
12
13=== modified file 'bzrlib/tests/test_cmdline.py'
14--- bzrlib/tests/test_cmdline.py 2010-12-06 14:01:44 +0000
15+++ bzrlib/tests/test_cmdline.py 2013-05-27 09:52:27 +0000
16@@ -66,6 +66,10 @@
17 self.assertAsTokens([(True, '')], u'""')
18 self.assertAsTokens([(False, u"''")], u"''")
19 self.assertAsTokens([(True, '')], u"''", single_quotes_allowed=True)
20+ self.assertAsTokens([(False, u'a'), (True, u''), (False, u'c')],
21+ u'a "" c')
22+ self.assertAsTokens([(False, u'a'), (True, u''), (False, u'c')],
23+ u"a '' c", single_quotes_allowed=True)
24
25 def test_unicode_chars(self):
26 self.assertAsTokens([(False, u'f\xb5\xee'), (False, u'\u1234\u3456')],
27
28=== modified file 'doc/en/release-notes/bzr-2.5.txt'
29--- doc/en/release-notes/bzr-2.5.txt 2013-05-23 09:27:10 +0000
30+++ doc/en/release-notes/bzr-2.5.txt 2013-05-27 09:52:27 +0000
31@@ -35,6 +35,9 @@
32 * ``bzr config`` properly handles aliases and references in the
33 ``--directory`` parameter (Vincent Ladeuil, Wouter van Heyst, #947049)
34
35+* Empty arguments in EDITOR are now properly preserved.
36+ (Ross Lagerwall, #1089792)
37+
38 * Fix a traceback when trying to checkout a tree that also has an entry
39 with file-id `TREE_ROOT` somewhere other than at the root directory.
40 (John Arbash Meinel, #830947)

Subscribers

People subscribed via source and target branches