Fwd: Another issue with Evolve (with test case)
Angel Ezquerra
angel.ezquerra at gmail.com
Fri Mar 22 10:28:06 CDT 2013
Hi,
I recently found a couple of issues while using evolve. I discussed
them briefly with Pierre-Yves and he suggested that I should send the
info to the mailing list.
In this particular case I was able to make a small test case that
fails every time I run it.
The following commands, executed on the windows cmd.exe or
powershell.exe result in a seemingly endless loop:
mkdir test-evolve
cd test-evolve
hg init
echo hello > c.txt
hg add c.txt
hg commit -m "add c.txt"
echo world > c.txt
hg commit -m "change c.txt"
hg rename c.txt d.txt
hg commit -m "rename c.txt into d.txt"
hg update 1
hg forget c.txt
hg log -G --hidden
hg amend -m "forget c.txt"
hg evolve --all
I also recorded in "test case format", including the actual output of
the test case:
$ mkdir test-evolve
$ cd test-evolve
$ hg init
$ echo hello > c.txt
$ hg add c.txt
$ hg commit -m "add c.txt"
$ echo world > c.txt
$ hg commit -m "change c.txt"
$ hg rename c.txt d.txt
$ hg commit -m "rename c.txt into d.txt"
$ hg update 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg forget c.txt
$ hg log -G --hidden
o changeset: 2:bcbf9f96baac
| tag: tip
| user: Angel Ezquerra <angel.ezquerra at gmail.com>
| date: Wed Mar 20 20:14:30 2013 +0100
| summary: rename c.txt into d.txt
|
@ changeset: 1:1e0016a962d9
| user: Angel Ezquerra <angel.ezquerra at gmail.com>
| date: Wed Mar 20 18:45:37 2013 +0100
| summary: change c.txt
|
o changeset: 0:56be9ac2d9d4
user: Angel Ezquerra <angel.ezquerra at gmail.com>
date: Wed Mar 20 18:45:32 2013 +0100
summary: add c.txt
$ hg amend -m "forget c.txt"
1 new unstable changesets
$ hg evolve --all
move:[2] rename c.txt into d.txt
atop:[4] forget c.txt
note: possible conflict - c.txt was deleted and renamed to:
d.txt
4 [<changectx 460ea8f795f4>, <changectx bcbf9f96baac>]
5
move:[5] rename c.txt into d.txt
atop:[5] rename c.txt into d.txt
move:[6] rename c.txt into d.txt
atop:[6] rename c.txt into d.txt
move:[7] rename c.txt into d.txt
atop:[7] rename c.txt into d.txt
move:[8] rename c.txt into d.txt
atop:[8] rename c.txt into d.txt
move:[9] rename c.txt into d.txt
atop:[9] rename c.txt into d.txt
move:[10] rename c.txt into d.txt
atop:[10] rename c.txt into d.txt
move:[11] rename c.txt into d.txt
atop:[11] rename c.txt into d.txt
move:[12] rename c.txt into d.txt
atop:[12] rename c.txt into d.txt
move:[13] rename c.txt into d.txt
atop:[13] rename c.txt into d.txt
move:[14] rename c.txt into d.txt
atop:[14] rename c.txt into d.txt
move:[15] rename c.txt into d.txt
atop:[15] rename c.txt into d.txt
move:[16] rename c.txt into d.txt
atop:[16] rename c.txt into d.txt
move:[17] rename c.txt into d.txt
atop:[17] rename c.txt into d.txt
interrupted!
Exception WindowsError: WindowsError(2, 'The system cannot find the
file specified') in <bound method transact
ion.__del__ of <mercurial.transaction.transaction object at
0x0000000002FF9710>> ignored
The test stops when I hit Ctrl-C. Note that the exception does not
always happen (I think it depends on when I interrupt the command).
BTW, the purpose of this test was to see what happens when you try to
evolve a revision in which a file was renamed when the user amends one
of its ancestors by removing the file that the obsoleted revision
renamed. The idea was to test what happens when you merge a deleted
and renamed file in this case.
Matt and I have have been discussing on the list the behavior of merge
when a file is deleted on one side and renamed on the other on the
list. I suspect that in the case of evolve the current behavior of
merge will yield surprising results (i.e. a deleted file may come
back...).
Cheers,
Angel
More information about the Mercurial-devel
mailing list