How do I configure a external Diff / Merge tool?

Asked by Greg on 2009-06-02

Please help a noob get custom Diff / Merge working.
I'm using QBzr via TortoiseBZR on Windows Vista.

I have WinMerge and Diffuse installed as well as TortoiseBZR v1.15.

Here's what I currently do:
1) TortoiseBazaar Settings -> General Bazaar Options. This shows the Configuration dialog.
2) Diff (tab) -> Add (button)
3) In the Name I enter WinMerge, in the Command I enter "c:\program files\winmerge\winmergeu"
Now my custom tool is visible from all appropriate Diff menus.

However when I select this tool to perform the Diff operation nothing happens. No error message, no application launch, nothing.
Obviously I'm doing it wrong, please set me straight.

I tried to ask a similar question in this earlier thread however noone has responded: https://bugs.launchpad.net/qbzr/+bug/247976

Question information

Language:
English Edit question
Status:
Solved
For:
QBzr Edit question
Assignee:
No assignee Edit question
Solved by:
Greg
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Belchenko (bialix) said :
#1

Greg пишет:
> New question #72983 on QBzr:
> https://answers.launchpad.net/qbzr/+question/72983
>
> Please help a noob get custom Diff / Merge working.
> I'm using QBzr via TortoiseBZR on Windows Vista.
>
> I have WinMerge and Diffuse installed as well as TortoiseBZR v1.15.
>
> Here's what I currently do:
> 1) TortoiseBazaar Settings -> General Bazaar Options. This shows the Configuration dialog.
> 2) Diff (tab) -> Add (button)
> 3) In the Name I enter WinMerge, in the Command I enter "c:\program files\winmerge\winmergeu"
> Now my custom tool is visible from all appropriate Diff menus.
>
> However when I select this tool to perform the Diff operation nothing happens. No error message, no application launch, nothing.
> Obviously I'm doing it wrong, please set me straight.

I've just tried it and managed it to work with following application path:

C:/program files/winmerge/winmergeu.exe

Note that you need to use forward slash instead of backslash, and you
need to specify '.exe' extension for application.

> I tried to ask a similar question in this earlier thread however noone has responded: https://bugs.launchpad.net/qbzr/+bug/247976

Sorry about this.

Revision history for this message
Greg (gregspecialsource) said :
#2

Thanks for responding.
I tried what you say, even copied the text from your post, but am still not getting any effect from the program.

I am logged in as an Administrator user but with no elevated privileges. (I doubt that is of relevance).

Please make further suggestions or request more information if you will. Thanks again.

Revision history for this message
Alexander Belchenko (bialix) said :
#3

Greg пишет:
> Question #72983 on QBzr changed:
> https://answers.launchpad.net/qbzr/+question/72983
>
> Status: Answered => Open
>
> Greg is still having a problem:
> Thanks for responding.
> I tried what you say, even copied the text from your post, but am still not getting any effect from the program.
>
> I am logged in as an Administrator user but with no elevated privileges.
> (I doubt that is of relevance).
>
> Please make further suggestions or request more information if you will.
> Thanks again.

Well, I'm working on Windows XP with QBzr trunk.

Can you update your qbzr plugin to latest version?
You have to do following:

1) Run DOS console
2) Navigate to your account's Application Data folder (on Windows XP
this is C:\Documents and Settings\USERNAME\Application Data)
You can use command
cd %APPDATA%

3) go to bazaar\2.0 subfolder:
cd bazaar\2.0

4) If there is not present 'plugins' directory you have to create it:
makdir plugins

5) Go to plugins subdirectory:
cd plugins

6) Get QBzr sources:
bzr branch lp:qbzr

After this command you'll have latest qbzr trunk. You can check that bzr
will use it looking at the output of command:

bzr plugins -v

At this point you have to reboot computer or logout/login to force your
Tortoise to load fresh qbzr version.

And try again.

If diff won't work anyway, please file a bug report and provide
corresponding part of .bzr.log. You can open this log with
Start -> Programs -> Bazaar -> Open bzr log file

Revision history for this message
Greg (gregspecialsource) said :
#4

It works! Thank you very much :)
Hope Tortoise gets that latest version integrated soon.

I now have both WinMerge and Diffuse working for Diff operation.

I'll have to experiment with Merge now. It seems to have a different configuration with 'Definition' and no 'Name,Command' option.

The only issue I found so far was when I Diff the 1st revision I get the following error because there is no previous revision:
"bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///C:/TestBazaar/.bzr/repository/') has no revision ('None',)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 729, in exception_to_return_code
  File "bzrlib\commands.pyo", line 924, in run_bzr
  File "bzrlib\commands.pyo", line 560, in run_argv_aliases
  File "C:/Users/REMOVED/AppData/Roaming/bazaar/2.0/plugins\qbzr\lib\commands.py", line 753, in run
  File "bzrlib\commands.pyo", line 924, in run_bzr
  File "bzrlib\commands.pyo", line 560, in run_argv_aliases
  File "bzrlib\commands.pyo", line 939, in ignore_pipe
  File "bzrlib\builtins.pyo", line 1806, in run
  File "bzrlib\diff.pyo", line 338, in _get_trees_to_diff
  File "bzrlib\diff.pyo", line 389, in _get_tree_to_diff
  File "bzrlib\revisionspec.pyo", line 260, in as_tree
  File "bzrlib\revisionspec.pyo", line 270, in _as_tree
  File "bzrlib\decorators.pyo", line 138, in read_locked
  File "bzrlib\repository.pyo", line 2308, in revision_tree
  File "bzrlib\decorators.pyo", line 138, in read_locked
  File "bzrlib\repository.pyo", line 2267, in get_revision_inventory
  File "bzrlib\decorators.pyo", line 138, in read_locked
  File "bzrlib\repository.pyo", line 2157, in get_inventory
  File "bzrlib\repository.pyo", line 2176, in _iter_inventories
  File "bzrlib\repository.pyo", line 2187, in _iter_inventory_xmls
NoSuchRevision: KnitPackRepository('file:///C:/TestBazaar/.bzr/repository/') has no revision ('None',)

bzr 1.15 on python 2.5.2 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qsubprocess', '"diff" "--using=C:/program files/winmerge/winmergeu.exe" -r revid:None..revid:REMOVED "src"']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.15]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [1.15]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [1.15]
  qbzr C:\Users\REMOVED\AppData\Roaming\bazaar\2.0\plugins\qbzr [0.10dev]
  svn C:\Program Files\Bazaar\plugins\svn [0.6.1]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred."

Revision history for this message
Alexander Belchenko (bialix) said :
#5

Greg пишет:
> Question #72983 on QBzr changed:
> https://answers.launchpad.net/qbzr/+question/72983
>
> Status: Answered => Solved
>
> Greg confirmed that the question is solved:
> It works! Thank you very much :)
> Hope Tortoise gets that latest version integrated soon.

Perhaps in bzr 1.15.1 or 1.16. Sorry for inconvenience.

>
> I now have both WinMerge and Diffuse working for Diff operation.
>
> I'll have to experiment with Merge now. It seems to have a different
> configuration with 'Definition' and no 'Name,Command' option.
>
> The only issue I found so far was when I Diff the 1st revision I get the following error because there is no previous revision:
> "bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///C:/TestBazaar/.bzr/repository/') has no revision ('None',)
>
> Traceback (most recent call last):
> File "bzrlib\commands.pyo", line 729, in exception_to_return_code
> File "bzrlib\commands.pyo", line 924, in run_bzr
> File "bzrlib\commands.pyo", line 560, in run_argv_aliases
> File "C:/Users/REMOVED/AppData/Roaming/bazaar/2.0/plugins\qbzr\lib\commands.py", line 753, in run
> File "bzrlib\commands.pyo", line 924, in run_bzr
> File "bzrlib\commands.pyo", line 560, in run_argv_aliases
> File "bzrlib\commands.pyo", line 939, in ignore_pipe
> File "bzrlib\builtins.pyo", line 1806, in run
> File "bzrlib\diff.pyo", line 338, in _get_trees_to_diff
> File "bzrlib\diff.pyo", line 389, in _get_tree_to_diff
> File "bzrlib\revisionspec.pyo", line 260, in as_tree
> File "bzrlib\revisionspec.pyo", line 270, in _as_tree
> File "bzrlib\decorators.pyo", line 138, in read_locked
> File "bzrlib\repository.pyo", line 2308, in revision_tree
> File "bzrlib\decorators.pyo", line 138, in read_locked
> File "bzrlib\repository.pyo", line 2267, in get_revision_inventory
> File "bzrlib\decorators.pyo", line 138, in read_locked
> File "bzrlib\repository.pyo", line 2157, in get_inventory
> File "bzrlib\repository.pyo", line 2176, in _iter_inventories
> File "bzrlib\repository.pyo", line 2187, in _iter_inventory_xmls
> NoSuchRevision: KnitPackRepository('file:///C:/TestBazaar/.bzr/repository/') has no revision ('None',)

This looks like the bug in qbzr (revid:None).
Please, file the bug report about this traceback.

>
> bzr 1.15 on python 2.5.2 (win32)
> arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qsubprocess', '"diff" "--using=C:/program files/winmerge/winmergeu.exe" -r revid:None..revid:REMOVED "src"']
> encoding: 'cp1252', fsenc: 'mbcs', lang: None
> plugins:
> bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.15]
> launchpad C:\Program Files\Bazaar\plugins\launchpad [1.15]
> netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [1.15]
> qbzr C:\Users\REMOVED\AppData\Roaming\bazaar\2.0\plugins\qbzr [0.10dev]
> svn C:\Program Files\Bazaar\plugins\svn [0.6.1]
> *** Bazaar has encountered an internal error.
> Please report a bug at https://bugs.launchpad.net/bzr/+filebug
> including this traceback, and a description of what you
> were doing when the error occurred."
>