Merge lp:~doxxx/bzr/828803-get_merge_tools-2.4 into lp:bzr/2.4

Proposed by Gordon Tyler
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 6046
Proposed branch: lp:~doxxx/bzr/828803-get_merge_tools-2.4
Merge into: lp:bzr/2.4
Diff against target: 49 lines (+6/-4)
3 files modified
bzrlib/config.py (+1/-1)
bzrlib/tests/test_config.py (+3/-1)
doc/en/release-notes/bzr-2.4.txt (+2/-2)
To merge this branch: bzr merge lp:~doxxx/bzr/828803-get_merge_tools-2.4
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+74773@code.launchpad.net

Commit message

Allow the uses of spaces in merge tools paths.

Description of the change

Fixes bug 828803 for bzr 2.4.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Ideally we should improve ._get_options() to just do the right thing (and there's a comment about that in _show_values), but this seems like a good step in the right direction regardless. I'm going to submit it to pqm.

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) 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/config.py'
2--- bzrlib/config.py 2011-08-23 07:49:31 +0000
3+++ bzrlib/config.py 2011-09-09 12:59:17 +0000
4@@ -573,7 +573,7 @@
5 for (oname, value, section, conf_id, parser) in self._get_options():
6 if oname.startswith('bzr.mergetool.'):
7 tool_name = oname[len('bzr.mergetool.'):]
8- tools[tool_name] = value
9+ tools[tool_name] = self.get_user_option(oname)
10 trace.mutter('loaded merge tools: %r' % tools)
11 return tools
12
13
14=== modified file 'bzrlib/tests/test_config.py'
15--- bzrlib/tests/test_config.py 2011-08-23 07:49:31 +0000
16+++ bzrlib/tests/test_config.py 2011-09-09 12:59:17 +0000
17@@ -166,6 +166,7 @@
18 user_global_option=something
19 bzr.mergetool.sometool=sometool {base} {this} {other} -o {result}
20 bzr.mergetool.funkytool=funkytool "arg with spaces" {this_temp}
21+bzr.mergetool.newtool='"newtool with spaces" {this_temp}'
22 bzr.default_mergetool=sometool
23 [ALIASES]
24 h=help
25@@ -1296,7 +1297,8 @@
26 self.log(repr(tools))
27 self.assertEqual(
28 {u'funkytool' : u'funkytool "arg with spaces" {this_temp}',
29- u'sometool' : u'sometool {base} {this} {other} -o {result}'},
30+ u'sometool' : u'sometool {base} {this} {other} -o {result}',
31+ u'newtool' : u'"newtool with spaces" {this_temp}'},
32 tools)
33
34 def test_get_merge_tools_empty(self):
35
36=== modified file 'doc/en/release-notes/bzr-2.4.txt'
37--- doc/en/release-notes/bzr-2.4.txt 2011-09-08 17:57:00 +0000
38+++ doc/en/release-notes/bzr-2.4.txt 2011-09-09 12:59:17 +0000
39@@ -29,8 +29,8 @@
40 Bug Fixes
41 *********
42
43-.. Fixes for situations where bzr would previously crash or give incorrect
44- or undesirable results.
45+* Fixed loading of external merge tools from config to properly decode
46+ command-lines which contain embedded quotes. (Gordon Tyler, #828803)
47
48 Documentation
49 *************

Subscribers

People subscribed via source and target branches