Problems extracting renames

Till Varoquaux till.varoquaux at gmail.com
Thu Feb 7 02:02:47 CST 2008


Finding a reproducible test case is not always easy. Fortunately in
this case there's a fairly simple one: following my hunch (and
everyone else's) that `merge` was wrecking havoc on the rename
information I came down to that script:

mkdir -p 1/a
echo -e "1\n2\n3" > 1/a/numbers
(cd 1
 hg init
 hg add *
 hg commit -m "initial import"
)
hg clone 1 2
(cd 2/
 hg mv a b
 hg commit -m "moved a to b"
 hg diff -g -r 0:tip
)
(cd 1
 echo 4 >> a/numbers
 hg commit -m "added 4 to numbers"
)
(cd 2/
 hg pull
 hg merge
 hg commit -m "merge"
 #hg diff -g -r 0:tip
)

The commented out diff does not pickup the rename.

Till
On Feb 7, 2008 12:09 AM, Matt Mackall <mpm at selenic.com> wrote:
>
> On Wed, 2008-02-06 at 15:34 -0800, Brendan Cully wrote:
> > On Wednesday, 06 February 2008 at 14:44, Bryan O'Sullivan wrote:
> > > Yaron Minsky wrote:
> > >
> > > > Interestingly, in the main tree we're looking at, we've seen that the
> > > > rename information shows up in some cases but not others.
> > >
> > > It's difficult to reproduce this from some ASCII art.  I tried, and
> > > couldn't really figure out what you were getting at.
> > >
> > > Could you write a small shell script that demonstrates what you're
> > > trying to show, and indicate where to look for the unexpected output?
> > > If there's something actually going wrong, that will make a good basis
> > > for a regression test.
> >
> > I think there have been other reports that git diff doesn't always find
> > renames. Hopefully there's something in the bts about this. If not, Alexis
> > may remember more than I do. I believe the right answer is to make git diff
> > (and status) use the rename detection code in merge.py.  Currently one or
> > both of those have handrolled versions that aren't quite complete.
>
> I suspect the merge code has gotten better exercised at this point.
> There might be some stickiness in terms of representing copies vs
> renames too.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>


More information about the Mercurial mailing list