Enhancement to also use the external diff tool for new and deleted files.
David Ingamells
david.ingamells at mapscape.eu
Wed Sep 17 15:38:35 BST 2008
Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David Ingamells wrote:
>
>> I suspect that it would be a thankless task trying to maintain a list of
>> various diff tools and how to call them.
>>
>
> We do that with mail clients, and things seem to have settled down.
>
>
[Caveat] I have not had chance to look at the diff plugin yet. It could
be that it solves all the issues
discussed below.
Some tools can be used in different ways (e.g. meld) and I wouldn't want
to force
users to have only one way if they choose such a tool.
>> Wouldn't it be more sense to
>> add a new option to diff --using to control this? Something like
>> -diffstyle visual|stdout|tree|...
>>
>
> That's certainly a reasonable way to proceed. Since --diffstyle
> wouldn't make sense without --using, we can also consider using
> prefixes, like: --using visual:meld.
>
>
Yes, after I sent the mail I was also thinking along the same lines.
This seems more attractive to me. A little care may be needed to make
sure it
works on windows, so that "C:\program files\mydiff/mydiff" is kept
together,
and the C: not seen as a prefix. Maybe a windows bazaar developer can
comment on this.
>> Where the default is "stdout" and is the current method and "visual"
>> tries to give all changes it can to a visual diff tool (e.g. meld).
>>
>
> I'm not sure that the names you're suggesting make sense, because I
> think there may be a lot of difference between visual tools. E.g.
> gvimdiff is single-file, while meld supports whole trees. Especially, I
> wonder how symlinks should be handled. I presume that you don't want to
> see anything on the console when you use a visual tool...
>
>
Meld can support both whole-tree mode and single-file mode, that is why I
thought it best to allow the user to say how to use the tool. Presently
it seems that "bzr diff --using" calls any diff tool in single-file mode.
The user could be given the choice between "visual" and "visualtree".
The remain choices could be "text" (default) for current behaviour
and "brief" to just list the changed files without showing any content (for
this option no diff tool would be needed).
I also think symlinks are tricky in single-file visual mode. The only
ideas I've
come up with are
- keep things as they are.
- make dummy file(s) that say something like "this is a symlink to XXX".
Renames and moves might also need console output in a visual mode and
even a
tree diff may not usefully report what has actually been done so those
are also tricky.
*However*, when a visual tool is used, the console output will be
limited to a
list of the changes, roughly the same size as what "bzr status" would
produce. i.e. no
more listings of file contents for adds and deletes that cause earlier
output to
be lost out of the scroll buffer. The console output can then be easily
viewed after
all the visual diffs have been done.
> Aaron
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFI0QRi0F+nu1YWqI0RAq3+AJwLXkpb5TCywfHVL0ayROYtPChQ2wCcCNTS
> Ef/XCyTwrz2bMHkigWecA1M=
> =i1Yg
> -----END PGP SIGNATURE-----
>
More information about the bazaar
mailing list