[Python-Dev] hg diff
Stephen J. Turnbull
stephen at xemacs.org
Mon Mar 7 03:43:23 CET 2011
"Martin v. Löwis" writes:
> Am 07.03.2011 02:24, schrieb Stephen J. Turnbull:
> > "Martin v. Löwis" writes:
> > > It seems that the dev guide recommends to use the --git option in hg
> > > diff. I'm working on the Rietveld integration, and found that this
> > > option makes things worse: the regular diff includes the base revision
> > > of the patch; hg diff --git doesn't.
> >
> > Does the regular diff work acceptably for the kinds of changes that
> > diff --git was designed to be an improvement for?
>
> I don't know. What are the kinds of changes that diff --git was designed
> for?
I don't know exactly how much of git diffcore has been implemented in
hg diff --git. However, git's diff handles renames and copies
correctly and pleasantly, including swapping file names (ie, renaming
a to b and b to a simultaneously), and can change file modes.
That kind of change is rather unpleasant to deal with in a traditional
diff format. Eg, renames are represented as deleting all the lines
from one file and re-adding them as a new file.
More information about the Python-Dev
mailing list