Merge tools: can't specify path includes whitespace

Bug #828803 reported by IWATA Hidetaka
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Gordon Tyler
2.4
Fix Released
Medium
Gordon Tyler

Bug Description

Affected version :0.21.1 (and maybe trunk)

First, I added merge tool configuration as below by qconfig.
  ["C:\Program Files\winmerge\winmergeu.exe" {Result}]

This worked correctly at that time.
But after executing qconfig again, this configuration was broken.
(Single quotations were attached automatically.)
  ['"C:\Program Files\winmerge\winmergeu.exe" {Result}']

# If executing and submitting qconfig several times, single or double quotations are increasing by every calls.
  ["""'"C:\Program Files\winmerge\winmergeu.exe" {Result}'"""]

Related branches

Revision history for this message
Gordon Tyler (doxxx) wrote :

I'll investigate.

Changed in qbzr:
assignee: nobody → Gordon Tyler (doxxx)
Revision history for this message
Gordon Tyler (doxxx) wrote :

The bug is actually in bzrlib config's function for loading merge tools, which is not correctly unquoting the value.

affects: qbzr → bzr
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Gordon Tyler (doxxx)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :

Unless you have a test to exhibit the bug in bzrlib.config, I'd be more inclined to suspect bzrlib.mergetools.invoke() where the command_line is split.

Thoughts ?

Revision history for this message
Gordon Tyler (doxxx) wrote :

The bug is specifically in the get_merge_tools function in GlobalConfig. It uses an internal _get_options function since it needs the option names in addition to their values. It was assuming that the value was the unquoted value but it appears that this changed at some point since my initial implementation. Changing it to use self.get_user_option() to get the value has fixed the problem.

Revision history for this message
Gordon Tyler (doxxx) wrote :

It's definitely not an invocation time problem. The problem can be seen in the qconfig window.

Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.5b1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.