[issue797] status --rev is wrong on merged working directories

Patrick Mézard mercurial-bugs at selenic.com
Thu Oct 25 21:12:19 UTC 2007


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

Test: merge two revisions then revert -a to either parent and status --rev to
this parent and the other. The result is quite confusing. I would have expected
status to be silent when called on the reverted parent and show parents diff in
the other case. Take a look at "reverting to 0" and following lines.


#!/bin/sh

hg init t1
cd t1
echo a > a
echo b >> a
hg ci -qAm t1
cd ..

hg init t2
cd t2
echo b > b
echo c >> b
hg ci -qAm t2
cd ..

hg init merge
cd merge
hg pull -q ../t1
hg pull -qf ../t2
hg up -qC 0
HGMERGE=true hg merge
hg log -v
echo % reverting to 1
hg revert -a -r 1
echo % st 0
hg st -amrd --rev 0
echo % st 1
hg st -amrd --rev 1

echo % reverting to 0
hg revert -a -r 0
echo % st 0
hg st -amrd --rev 0
echo % st 1
hg st -amrd --rev 1


######### OUTPUT ###########

warning: repository is unrelated
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
changeset:   1:051bf743582c
tag:         tip
parent:      -1:000000000000
user:        test
date:        Thu Oct 25 21:04:57 2007 +0000
files:       b
description:
t2


changeset:   0:e3233f614d67
user:        test
date:        Thu Oct 25 21:04:56 2007 +0000
files:       a
description:
t1


% reverting to 1
removing a
reverting b
% st 0
M b
R a
% st 1
% reverting to 0
undeleting a
removing b
% st 0
R b
% st 1
A a
R b

----------
messages: 4188
nosy: pmezard
priority: bug
status: unread
title: status --rev is wrong on merged working directories

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




More information about the Mercurial-devel mailing list