##// END OF EJS Templates
[PATCH] Removal of a file added by merging branches...
[PATCH] Removal of a file added by merging branches -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] Removal of a file added by merging branches From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk> Fixing a bug where removal of a file which is added when doing a merge would cause python exception to be thrown. manifest hash: 0bdd80e8abcee6aaa4804bb588f9939596fb3dd0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCuNjLywK+sNU5EO8RAo44AJ4mvjsJcYOj/EmVDFrdkK3D3WHFSwCffxfV cRl8mXc252/oRcYaMZbgrlg= =S5x6 -----END PGP SIGNATURE-----

File last commit:

r28:9f64ee81 default
r416:5e9e8b8d default
Show More
fish-merge
86 lines | 1.4 KiB | text/plain | TextLexer
set -e
set -x
# skip commit logs
export HGMERGE=tkmerge
export EDITOR=true
rm -rf m m1 m2
mkdir m
cd m
echo "m this that"
echo "this" > a
echo "that" > b
hg init
hg addremove
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ..
echo "m2 this that "
mkdir m2
cd m2
hg branch ../m
hg checkout
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m
echo "m this1 that "
echo "this1" > a
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ..
echo "m1 this1 that "
mkdir m1
cd m1
hg branch ../m
hg checkout
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m1
echo "m1 this1 that1"
echo "that1" > b
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m2
echo "m2 this that2"
echo "that2" > b
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m1
echo "m1:m2 this1 that1 that2"
hg merge ../m2 # b should conflict, a should be fine
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m2
echo "m2 this2 that2"
echo "this2" > a
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo
cd ../m2
echo "m2:m this12 that2"
hg merge ../m # a should conflict, b should be fine
echo "a:" `hg dump a` "b:" `hg dump b`
echo
# now here's the interesting bit
# if we choose ancestor by file, no conflicts
# otherwise we've got two equally close ancestors, each with a conflict
# if we go back to the root, we'll have both conflicts again
echo "m2:m1 this12 that12"
hg merge ../m1 # should be clean
echo "a:" `hg dump a` "b:" `hg dump b`
echo