[issue451] Strip with multiple heads acts strangely

Patrick Mézard mercurial-bugs at selenic.com
Fri Dec 15 14:39:24 CST 2006


New submission from Patrick Mézard <pmezard at gmail.com>:

Summary
-------
1- Create two heads A and B. Keep B as current changeset.
2- Strip A. On windows, it tries to backup automatically and fails because of
target backup path problem I think.
3- At this point, both branches have disappeared.
4- Recover does nothing.
5- Rollback recreates 2 heads with nul identifier, and leave with a working
directory in a strange state.
6- Verify reports incorrect links.

Test trace:
"""
hg init

echo a > a.txt
hg add a.txt
hg commit -m testa

echo b > b.txt
hg add b.txt
hg commit -m testb

hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved

echo c > c.txt
hg add c.txt
hg commit -m testc

hg heads
changeset:   2:e130a7b6b13a
tag:         tip
parent:      0:07196ada530a
user:        Patrick Mezard <pmezard at gmail.com>
date:        Fri Dec 15 21:37:06 2006 +0100
summary:     testc

changeset:   1:a34e215fdd0c
user:        Patrick Mezard <pmezard at gmail.com>
date:        Fri Dec 15 21:37:05 2006 +0100
summary:     testb

hg strip 1
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
saving bundle to C:\test-strip\.hg\strip-backup\a34e215fdd0c.

saving bundle to C:\test-strip\.hg\strip-backup\a34e215fdd0c.

adding branch
abort: unknown url type: c

hg log
changeset:   0:07196ada530a
tag:         tip
user:        Patrick Mezard <pmezard at gmail.com>
date:        Fri Dec 15 21:37:05 2006 +0100
summary:     testa

hg stat

hg recover
no interrupted transaction available

hg rollback
rolling back last transaction

hg log
changeset:   2:000000000000
tag:         tip
parent:      0:07196ada530a
parent:      0:07196ada530a
user:
date:        Thu Jan 01 00:00:00 1970 +0000

changeset:   1:000000000000
tag:         tip
parent:      0:07196ada530a
parent:      0:07196ada530a
user:
date:        Thu Jan 01 00:00:00 1970 +0000

changeset:   0:07196ada530a
user:        Patrick Mezard <pmezard at gmail.com>
date:        Fri Dec 15 21:37:05 2006 +0100
summary:     testa

hg stat
A c.txt

hg verify
checking changesets
changelog index contains 15 extra bytes
incorrect link (-1) for changeset revision 1
incorrect link (-1) for changeset revision 2
duplicate changeset at revision 2
checking manifests
manifest index contains 59 extra bytes
bad manifest link (-1) at revision 1
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 1 total revisions
6 integrity errors encountered!
"""

----------
messages: 2521
nosy: pmezard
priority: bug
status: unread
title: Strip with multiple heads acts strangely

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



More information about the Mercurial-devel mailing list