Inconsistent Diff behavior

Bug #391471 reported by Greg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TortoiseBZR
Confirmed
Low
Unassigned

Bug Description

The behavior of Diff in various menus is not consistent.
This relates to user configured diff programs and modifying a file under version control.

Steps:
1) Modify a text file currently in version control by adding a line of text.
2) Right click on that file in Windows Explorer. Tortoise Bazaar -> Diff
3) Observe that it launches the DEFAULT diff program, not the user configured default.

4) Select 'Using' drop down from the default diff window, select another diff program (eg. WinMerge or Diffuse)
5) Observe error:

External Diff
Description
C:/program files/winmerge/winmergeu.exe
Status
bzr: ERROR: Path(s) are not versioned: C:
\testBazaar\src\file1.txt src/file1.txt
[OK] [Cancel]

6) Back in Windows Explorer, Rick Click that source file. Tortoise Bazaar -> Revert
7) From the Revert dialog, select Diff (button at the bottom, as it is)
8) Observe the correct launch of user configured diff program with modification vs last commit!

So, we seem to have an issue at (3) where the user configured diff program is not used by the context menu 'diff'.
We also have an issue from that dialog where the manually selected diff program will not launch.
However we know it all should work because (8) shows exactly what I am after, a diff of the current vs last commit with my user configured diff program.

Revision history for this message
Alexander Belchenko (bialix) wrote :

As I know TortoiseBzr simply invokes `bzr qdiff` command (qdiff command from QBzr plugin). Therefore most likely this problem has roots in QBzr plugin (behaviour of qdiff command).

Gary, what do you think?

Revision history for this message
Gary van der Merwe (garyvdm) wrote : Re: [Bug 391471] Re: Inconsistent Diff behavior

On Wed, Jun 24, 2009 at 1:16 PM, Alexander Belchenko<email address hidden> wrote:
> As I know TortoiseBzr simply invokes `bzr qdiff` command (qdiff command
> from QBzr plugin). Therefore most likely this problem has roots in QBzr
> plugin (behaviour of qdiff command).
>
> Gary, what do you think?

I specifically wrote qdiff like this, otherwise, if you make an
external diff program the default, then it's impossible to get into
qdiff.

I think that TortoiseBzr, Bzr-Explore, etc. should implement a diff
menu like qbzrs' , looking at the settings the qbzr writes (hmm, and
move these from qbzr.conf to bazaar.conf.) To make this easy for
TortoiseBzr, Bzr-Explore, we should make bzr diff --using qdiff work
intelligently, and Builtin diff needs to be saved as QBzr Builtin Diff
= qdiff

Revision history for this message
methane (songofacandy) wrote :

OK.
Is this bug affect to bzr-explorer too?
And what is the API get default diff setting from qbzr.conf?

Changed in tortoisebzr:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Greg (gregspecialsource) wrote :

INADA Naoki, this bug partly affects bzr explorer.

I just tested, launching Diff these ways:
1) Diff icon beside the modified file
2) Diff icon in toolbar
3) Explore -> Browse Items -> Diff

None of these produced the error message. However Diff behavior WAS inconsistent:
(1) Launches built in diff instead of user default.
(2) Launches built in diff instead of user default.
(3) Launches the user configured diff.

I notice that when multiple files have changed, it may be preferable to launch the built in Diff OR use a different user defined command because:
a) Diff is launched once per modified file, in sequence (close one window, the next file opens). This may not be desirable behavior.
b) Some Diff apps have a different command syntax allowing multiple files to be opened at the same time. It would be nice to support this case.
c) When viewing changes to multiple files, rather than a single, specific file, the user is more likely wanting to view changes instead of edit them.

So, in conclusion, Diff should produce consistent behavior, launching the user specified default. Diff on multiple files should be handled separately to Diff of a single file for a better user experience.

Revision history for this message
methane (songofacandy) wrote :

I think all of qbzr, tbzr, and bzr-explorer implement "launch a
default diff" is ugly.
Can bzr or qbzr provide a "launch a default diff" API?

--
Naoki INADA <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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