tests/test-export
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Thu, 28 May 2009 17:44:57 +0200
changeset 8649 2c097e22492c
parent 8167 6c82beaaa11a
permissions -rwxr-xr-x
clone: fall back to pull source repo cannot be locked, 937ee88da3ef was a noop 937ee88da3ef was a noop, it was missing the wait keyword

#!/bin/sh

hg init repo
cd repo
touch foo
hg add foo
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
    echo "foo-$i" >> foo
    hg ci -m "foo-$i"
done

for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
    echo "# foo-$out.patch"
    hg export -v -o "foo-$out.patch" 2:tip
done

echo "# exporting 4 changesets to a file"
hg export -o export_internal 1 2 3 4
grep HG export_internal | wc -l | sed -e 's/^ *//'
echo "# exporting 4 changesets to a file"
hg export 1 2 3 4 | grep HG | wc -l | sed -e 's/^ *//'
echo "# exporting revision -2 to a file"
hg export -- -2