##// END OF EJS Templates
add cmdutil.remoteui...
add cmdutil.remoteui remoteui sorts out the issues of getting ssh config options from the local repo into the remote one while not copying other options like hooks.

File last commit:

r8167:6c82beaa default
r8188:f3abe032 default
Show More
test-merge-commit
74 lines | 1.6 KiB | text/plain | TextLexer
/ tests / test-merge-commit
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058 #!/bin/sh
# check that renames are correctly saved by a commit after a merge
# test with the merge on 3 having the rename on the local parent
hg init a
cd a
echo line1 > foo
hg add foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '0: add foo'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058
echo line2 >> foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '1: change foo'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058
hg up -C 0
hg mv foo bar
rm bar
echo line0 > bar
echo line1 >> bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '2: mv foo bar; change bar'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058
hg merge 1
echo '% contents of bar should be line0 line1 line2'
cat bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '3: merge with local rename'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058 hg debugindex .hg/store/data/bar.i
hg debugrename bar
hg debugindex .hg/store/data/foo.i
# revert the content change from rev 2
hg up -C 2
rm bar
echo line1 > bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '4: revert content change from rev 2'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058
hg log --template '#rev#:#node|short# #parents#\n'
echo '% this should use bar@rev2 as the ancestor'
hg --debug merge 3
echo '% contents of bar should be line1 line2'
cat bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '5: merge'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058 hg debugindex .hg/store/data/bar.i
# same thing, but with the merge on 3 having the rename on the remote parent
echo
echo
cd ..
hg clone -U -r 1 -r 2 a b
cd b
hg up -C 1
hg merge 2
echo '% contents of bar should be line0 line1 line2'
cat bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '3: merge with remote rename'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058 hg debugindex .hg/store/data/bar.i
hg debugrename bar
hg debugindex .hg/store/data/foo.i
# revert the content change from rev 2
hg up -C 2
rm bar
echo line1 > bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '4: revert content change from rev 2'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058
hg log --template '#rev#:#node|short# #parents#\n'
echo '% this should use bar@rev2 as the ancestor'
hg --debug merge 3
echo '% contents of bar should be line1 line2'
cat bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m '5: merge'
Alexis S. L. Carvalho
filecommit: don't forget the local parent on a merge with a local rename
r4058 hg debugindex .hg/store/data/bar.i