##// END OF EJS Templates
hgignore.5.txt: improved description of matching...
hgignore.5.txt: improved description of matching Improved the description of the matching behavior used with .hgignore. Made some minor language improvements.

File last commit:

r8811:8b35b087 default
r9127:35c3f942 default
Show More
test-transplant
158 lines | 2.7 KiB | text/plain | TextLexer
Brendan Cully
Add transplant extension
r3714 #!/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'
Brendan Cully
Minor test-transplant cleanup
r4034 hg clone . ../rebase
cd ../rebase
Brendan Cully
Add transplant extension
r3714
hg up -C 1
echo '% rebase b onto r1'
hg transplant -a -b tip
hg log --template '{rev} {parents} {desc}\n'
Brendan Cully
Minor test-transplant cleanup
r4034 hg clone ../t ../prune
cd ../prune
Brendan Cully
Add transplant extension
r3714
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'
Brendan Cully
Minor test-transplant cleanup
r4034 hg clone -r 1 ../t ../remote
cd ../remote
Brendan Cully
Add transplant extension
r3714 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'
Brendan Cully
Minor test-transplant cleanup
r4034 hg clone ../t ../pullback
cd ../pullback
Brendan Cully
Add transplant extension
r3714 hg transplant -s ../remote -a -b tip
Brendan Cully
transplant: fix --continue; add --continue test
r3724
Brendan Cully
Make test-transplant test pull case
r4036 echo '% remote transplant with pull'
Bryan O'Sullivan
Allow tests to run in parallel.
r5384 hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid
Brendan Cully
transplant: test non-local source
r4050 cat ../t.pid >> $DAEMON_PIDS
Brendan Cully
Make test-transplant test pull case
r4036 hg clone -r 0 ../t ../rp
cd ../rp
Bryan O'Sullivan
Allow tests to run in parallel.
r5384 hg transplant -s http://localhost:$HGPORT/ 2 4
Brendan Cully
Make test-transplant test pull case
r4036 hg log --template '{rev} {parents} {desc}\n'
Brendan Cully
transplant: fix --continue; add --continue test
r3724 echo '% transplant --continue'
hg init ../tc
cd ../tc
cat <<EOF > foo
foo
bar
baz
EOF
Brendan Cully
transplant: recover added/removed files after failed application
r3726 echo toremove > toremove
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -Amfoo
Brendan Cully
transplant: fix --continue; add --continue test
r3724 cat <<EOF > foo
foo2
bar2
baz2
EOF
Brendan Cully
transplant: recover added/removed files after failed application
r3726 rm toremove
echo added > added
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -Amfoo2
Brendan Cully
transplant: fix --continue; add --continue test
r3724 echo bar > bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -Ambar
Brendan Cully
transplant: fix --continue; add --continue test
r3724 echo bar2 >> bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -mbar2
Brendan Cully
transplant: fix --continue; add --continue test
r3724 hg up 0
echo foobar > foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -mfoobar
Brendan Cully
transplant: fix --continue; add --continue test
r3724 hg transplant 1:3
Brendan Cully
transplant: log source node when recovering too.
r3758 # transplant -c shouldn't use an old changeset
hg up -C
Benoit Boissinot
update --clean: do not unlink added files (issue575)
r8518 rm added
Brendan Cully
transplant: log source node when recovering too.
r3758 hg transplant 1
Brendan Cully
transplant: fix --continue; add --continue test
r3724 hg transplant --continue
Brendan Cully
transplant: log source node when recovering too.
r3758 hg transplant 1:3
Brendan Cully
transplant: recover added/removed files after failed application
r3726 hg locate
Patrick Mezard
localrepo: fix partial merge test (issue 1111)
r6639 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 ..
Jacob Lee
transplant: remove the restriction that the destination be nonempty....
r8173
echo '% test transplant into empty repository'
hg init empty
cd empty
hg transplant -s ../t -b tip -a
cd ..
echo '% test filter'
hg init filter
cd filter
cat <<'EOF' >test-filter
#!/bin/sh
sed 's/r1/r2/' $1 > $1.new
mv $1.new $1
EOF
chmod +x test-filter
hg transplant -s ../t -b tip -a --filter ./test-filter |\
sed 's/filtering.*/filtering/g'
hg log --template '{rev} {parents} {desc}\n'
Patrick Mezard
Make mq, record and transplant honor patch.eol
r8811 cd ..
echo '% test with a win32ext like setup (differing EOLs)'
hg init twin1
cd twin1
echo a > a
echo b > b
echo b >> b
hg ci -Am t
echo a > b
echo b >> b
hg ci -m changeb
cd ..
hg init twin2
cd twin2
echo '[patch]' >> .hg/hgrc
echo 'eol = crlf' >> .hg/hgrc
python -c "file('b', 'wb').write('b\r\nb\r\n')"
hg ci -m addb
hg transplant -s ../twin1 tip
python -c "print repr(file('b', 'rb').read())"
cd ..