[issue850] Directory rename inference may lead to unexpected merge result

Peter Arrenbrecht mercurial-bugs at selenic.com
Fri Nov 30 08:37:30 CST 2007


New submission from Peter Arrenbrecht <peter.arrenbrecht at gmail.com>:

When moving the sole file within a folder "a" to a new folder "b", hg infers
folder "a" was renamed to "b". But that was not the intention. A subsequent
merge of a new file in "a" moves the new file to "b".

#! /bin/bash
#rm repo -rf # -- uncomment to make repeatable
hg init repo
cd repo
hg init one
cd one
mkdir a
echo "one" >a/one
hg add
hg ci -m "one"
cd ..
hg clone one two
cd two
echo "two" >a/two
hg add
hg ci -m "two"
cd ..
cd one
mkdir b
hg mv a/one b/one
hg ci -m "a2b"
hg pull -u ../two
hg merge
echo "a contains"
ls a
echo "b contains"
ls b

----------
messages: 4394
nosy: parren
priority: wish
status: chatting
title: Directory rename inference may lead to unexpected merge result
topic: merge

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



More information about the Mercurial-devel mailing list