Mercurial > hg
view tests/test-transplant @ 7429:dbc40381620e
tests: Skip tests if they will fail because of outer repo
For different reasons these tests will fail if run in a tmpdir which is in a hg
repo.
The following three tests assumes no .hg in path dirs - I don't know how to
work around that:
* test-dispatch explicitly tests for no repo and expects "abort: There is no
Mercurial repository here (.hg not found)!"
* test-extension expects parentui to be None when not cd'ed to a repo dir
* test-globalopts tests that implicit -R works correctly - that could perhaps be
done from another repo instead of assuming no repo
The following two might be worth investigating further:
* test-convert-svn-sink fails for unknown reasons, starting with "abort:
unresolved merge conflicts (see hg resolve)"
* test-glog gets strange failures when testing "from outer space"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 27 Nov 2008 00:57:31 +0100 |
parents | 6334569c8caa |
children | 6c82beaaa11a |
line wrap: on
line source
#!/bin/sh cat <<EOF >> $HGRCPATH [extensions] transplant= EOF hg init t cd t echo r1 > r1 hg ci -Amr1 -d'0 0' echo r2 > r2 hg ci -Amr2 -d'1 0' hg up 0 echo b1 > b1 hg ci -Amb1 -d '0 0' echo b2 > b2 hg ci -Amb2 -d '1 0' echo b3 > b3 hg ci -Amb3 -d '2 0' hg log --template '{rev} {parents} {desc}\n' hg clone . ../rebase cd ../rebase hg up -C 1 echo '% rebase b onto r1' hg transplant -a -b tip hg log --template '{rev} {parents} {desc}\n' hg clone ../t ../prune cd ../prune hg up -C 1 echo '% rebase b onto r1, skipping b2' hg transplant -a -b tip -p 3 hg log --template '{rev} {parents} {desc}\n' echo '% remote transplant' hg clone -r 1 ../t ../remote cd ../remote hg transplant --log -s ../t 2 4 hg log --template '{rev} {parents} {desc}\n' echo '% skip previous transplants' hg transplant -s ../t -a -b 4 hg log --template '{rev} {parents} {desc}\n' echo '% skip local changes transplanted to the source' echo b4 > b4 hg ci -Amb4 -d '3 0' hg clone ../t ../pullback cd ../pullback hg transplant -s ../remote -a -b tip echo '% remote transplant with pull' hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid cat ../t.pid >> $DAEMON_PIDS hg clone -r 0 ../t ../rp cd ../rp hg transplant -s http://localhost:$HGPORT/ 2 4 hg log --template '{rev} {parents} {desc}\n' echo '% transplant --continue' hg init ../tc cd ../tc cat <<EOF > foo foo bar baz EOF echo toremove > toremove hg ci -Amfoo -d '0 0' cat <<EOF > foo foo2 bar2 baz2 EOF rm toremove echo added > added hg ci -Amfoo2 -d '0 0' echo bar > bar hg ci -Ambar -d '0 0' echo bar2 >> bar hg ci -mbar2 -d '0 0' hg up 0 echo foobar > foo hg ci -mfoobar -d '0 0' hg transplant 1:3 # transplant -c shouldn't use an old changeset hg up -C hg transplant 1 hg transplant --continue hg transplant 1:3 hg locate cd .. # Test transplant --merge (issue 1111) echo % test transplant merge hg init t1111 cd t1111 echo a > a hg ci -Am adda echo b >> a hg ci -m appendb echo c >> a hg ci -m appendc hg up -C 0 echo d >> a hg ci -m appendd echo % tranplant hg transplant -m 1 cd ..