##// END OF EJS Templates
tests: remove unneeded -d flags...
tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.

File last commit:

r10119:bb5ea667 default
r12156:4c94b6d0 default
Show More
test-convert-clonebranches
54 lines | 1.0 KiB | text/plain | TextLexer
/ tests / test-convert-clonebranches
#!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo "[convert]" >> $HGRCPATH
echo "hg.tagsbranch=0" >> $HGRCPATH
hg init source
cd source
echo a > a
hg ci -qAm adda
# Add a merge with one parent in the same branch
echo a >> a
hg ci -qAm changea
hg up -qC 0
hg branch branch0
echo b > b
hg ci -qAm addb
hg up -qC
hg merge default
hg ci -qm mergeab
hg tag -ql mergeab
cd ..
# Miss perl... sometimes
cat > filter.py <<EOF
import sys, re
r = re.compile(r'^(?:\d+|pulling from)')
sys.stdout.writelines([l for l in sys.stdin if r.search(l)])
EOF
echo % convert
hg convert -v --config convert.hg.clonebranches=1 source dest |
python filter.py
# Add a merge with both parents and child in different branches
cd source
hg branch branch1
echo a > file1
hg ci -qAm c1
hg up -qC mergeab
hg branch branch2
echo a > file2
hg ci -qAm c2
hg merge branch1
hg branch branch3
hg ci -qAm c3
cd ..
echo % incremental conversion
hg convert -v --config convert.hg.clonebranches=1 source dest |
python filter.py