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
=== modified file 'bzrlib/config.py'
--- bzrlib/config.py 2011-08-23 07:49:31 +0000
+++ bzrlib/config.py 2011-09-09 12:59:17 +0000
@@ -573,7 +573,7 @@
573 for (oname, value, section, conf_id, parser) in self._get_options():573 for (oname, value, section, conf_id, parser) in self._get_options():
574 if oname.startswith('bzr.mergetool.'):574 if oname.startswith('bzr.mergetool.'):
575 tool_name = oname[len('bzr.mergetool.'):]575 tool_name = oname[len('bzr.mergetool.'):]
576 tools[tool_name] = value576 tools[tool_name] = self.get_user_option(oname)
577 trace.mutter('loaded merge tools: %r' % tools)577 trace.mutter('loaded merge tools: %r' % tools)
578 return tools578 return tools
579579
580580
=== modified file 'bzrlib/tests/test_config.py'
--- bzrlib/tests/test_config.py 2011-08-23 07:49:31 +0000
+++ bzrlib/tests/test_config.py 2011-09-09 12:59:17 +0000
@@ -166,6 +166,7 @@
166user_global_option=something166user_global_option=something
167bzr.mergetool.sometool=sometool {base} {this} {other} -o {result}167bzr.mergetool.sometool=sometool {base} {this} {other} -o {result}
168bzr.mergetool.funkytool=funkytool "arg with spaces" {this_temp}168bzr.mergetool.funkytool=funkytool "arg with spaces" {this_temp}
169bzr.mergetool.newtool='"newtool with spaces" {this_temp}'
169bzr.default_mergetool=sometool170bzr.default_mergetool=sometool
170[ALIASES]171[ALIASES]
171h=help172h=help
@@ -1296,7 +1297,8 @@
1296 self.log(repr(tools))1297 self.log(repr(tools))
1297 self.assertEqual(1298 self.assertEqual(
1298 {u'funkytool' : u'funkytool "arg with spaces" {this_temp}',1299 {u'funkytool' : u'funkytool "arg with spaces" {this_temp}',
1299 u'sometool' : u'sometool {base} {this} {other} -o {result}'},1300 u'sometool' : u'sometool {base} {this} {other} -o {result}',
1301 u'newtool' : u'"newtool with spaces" {this_temp}'},
1300 tools)1302 tools)
13011303
1302 def test_get_merge_tools_empty(self):1304 def test_get_merge_tools_empty(self):
13031305
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- doc/en/release-notes/bzr-2.4.txt 2011-09-08 17:57:00 +0000
+++ doc/en/release-notes/bzr-2.4.txt 2011-09-09 12:59:17 +0000
@@ -29,8 +29,8 @@
29Bug Fixes29Bug Fixes
30*********30*********
3131
32.. Fixes for situations where bzr would previously crash or give incorrect32* Fixed loading of external merge tools from config to properly decode
33 or undesirable results.33 command-lines which contain embedded quotes. (Gordon Tyler, #828803)
3434
35Documentation35Documentation
36*************36*************

Subscribers

People subscribed via source and target branches