[issue963] Parent of working dir incorrect after import of multiple patches and rollback

Andrei Badea mercurial-bugs at selenic.com
Sat Feb 2 12:08:54 CST 2008


New submission from Andrei Badea <andrei.badea at movzx.net>:

Import multiple patches with a single "hg import" and do a "hg rollback". The
last patch is rolled back (as expected), but the working dir parent is set to
the changeset which was the parent before the "hg import". For example:

mkdir repo
cd repo
hg init
echo file0 > file0
hg ci -A -m 'file0'
echo file1 > file1
hg ci -A -m 'file1'
echo file2 > file2
hg ci -A -m 'file2'
hg export -o ../%n 1:2
hg strip -n 1
hg import --base ../ 1 2
hg rollback
hg par
hg stat

After importing the patches for file1 and file2 and doing a rollback, the
working dir parent is set to changeset 0. But since only changeset 2 was rolled
back, I expected the working dir parent to be changeset 1. This is confusing:
you rollback a single changeset, still the output of "hg stat" looks like more
was rolled back.

----------
messages: 5084
nosy: abadea
priority: bug
status: unread
title: Parent of working dir incorrect after import of multiple patches and rollback

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue963>
____________________________________________________



More information about the Mercurial-devel mailing list