Using external diff tool is inconsistent for modified and added files

Bug #1028223 reported by Simone Manganelli
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

I'm using an external diff tool with bzr. I've set my diff alias like so:

bzr alias diff="diff --using=ksdiff-wrapper --diff-options=bzr"

Then I start a diff using the regular `bzr diff` command. When bzr reports modified files, it correctly communicates with the external app (Kaleidoscope), which shows the differences for those modified files. However, when it comes to an added file (not a modified file), bzr barfs with the following errors:

=== added file 'blahgitty copia.txt'
diff: extra operand `bzr'
diff: Try `diff --help' for more information.

bzr: ERROR: external diff failed with exit code 2; command: ['diff', '--label', u'blahgitty copia.txt\t1970-01-01 00:00:00 +0000', '/var/folders/3c/txyjzn6x4vl2y4dqtr22zth40000gn/T/bzr-diff-old-JtX25v', '--label', u'blahgitty copia.txt\t2012-05-08 08:53:44 +0000', '/var/folders/3c/txyjzn6x4vl2y4dqtr22zth40000gn/T/bzr-diff-new-19Qjq7', '--binary', '-u', 'bzr']

My external diff tool isn't called at all. bzr seems to be passing the parameters to the tool "diff", not to "ksdiff-wrapper", as I had specified in my diff alias.

It seems that maybe diff alias expansion isn't working for added files, but it is for modified files? Is my assessment here correct, or am I doing something wrong?

Revision history for this message
Martin Packman (gz) wrote :

Indeed, it seems that added files do not use the program given by --using but do take note of --diff-options which rather breaks your otherwise reasonable looking alias.

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.