diffing file revisions across renames??

Leo Razoumov slonik.az at gmail.com
Mon Apr 16 11:08:11 CDT 2007

On 4/16/07, Alexis S. L. Carvalho <alexis at cecm.usp.br> wrote:
> Thus spake Leo Razoumov:
> > I am using Mercurial 0.9.3 and find its file rename features very
> > useful, indeed.
> > I can list a file's history information across renames with "hg log
> > -f" but I have not found a way to diff two file revisions that across
> > renames. This would be very useful, for I tend to rename files quite
> > often as my project progresses.
> >
> > Any help or/and advice is highly appreciated.
> Try
> hg diff --git -r rev-before-rename -r rev-after-rename new-filename
> But I think even this won't work in all cases - we should probably
> change diff to use the same move/copy detection used by merge.
> Alexis
> _______________________________________________

thanks a lot! "--git" option did the trick for me.
"hg diff --git" does honor file copies and pull old revision as revision 'a'.
Without "--git" hg uses "/dev/null" in place of revision 'a' which
makes the whole diff business meaningless.

As of now I am using "--git" for all my "diff".


More information about the Mercurial mailing list