[Python-Dev] hg diff
"Martin v. Löwis"
martin at v.loewis.de
Mon Mar 7 05:32:24 CET 2011
Am 07.03.2011 03:43, schrieb Stephen J. Turnbull:
> "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.
Ok, so the next question is what constitutes an acceptable
representation. I find the original approach to diff completely
acceptable, also considering that people rarely rename files,
and if they do, they typically don't put patches into a bug tracker.
Regards,
Martin
More information about the Python-Dev
mailing list