Mercurial > public > mercurial-scm > hg
diff tests/test-convert-cvsnt-mergepoints @ 8821:c66e324d3961
Fix test-convert-cvsnt-mergepoints so it works reliably.
Specifically, always run 'cvs commit' with -f option to force commit;
add one strategic sleep which seems to be necessary for post-merge
clobber-and-commit (-f doesn't force a commit there?).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Mon, 15 Jun 2009 20:35:19 -0400 |
parents | e8cb1fa0d4a9 |
children | 56a5f80556f5 |
line wrap: on
line diff
--- a/tests/test-convert-cvsnt-mergepoints Mon Jun 15 20:35:19 2009 -0400 +++ b/tests/test-convert-cvsnt-mergepoints Mon Jun 15 20:35:19 2009 -0400 @@ -17,8 +17,8 @@ # -- just keep the part that matters cvsci() { - echo cvs -f ci "$@" - cvs -f ci "$@" 2>&1 | egrep "^(new|initial) revision:" + echo cvs -f ci -f "$@" + cvs -f ci -f "$@" 2>&1 | egrep "^(new|initial) revision:" } hgcat() @@ -50,7 +50,7 @@ cd foo echo foo > foo.txt cvscall -Q add foo.txt -cvsci -m "foo.txt" +cvsci -m "add foo.txt" foo.txt cd ../.. rm -rf cvsworktmp @@ -63,33 +63,38 @@ cvscall -q rtag -b -R MYBRANCH1 foo cvscall -Q update -P -r MYBRANCH1 echo bar > foo.txt -cvsci -m "bar" +cvsci -m "bar" foo.txt echo baz > foo.txt -cvsci -m "baz" +cvsci -m "baz" foo.txt echo "% create MYBRANCH1_2 and modify foo.txt some more" cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo cvscall -Q update -P -r MYBRANCH1_2 echo bazzie > foo.txt -cvsci -m "bazzie" +cvsci -m "bazzie" foo.txt echo "% create MYBRANCH1_1 and modify foo.txt yet again" cvscall -q rtag -b -R MYBRANCH1_1 foo cvscall -Q update -P -r MYBRANCH1_1 echo quux > foo.txt -cvsci -m "quux" +cvsci -m "quux" foo.txt echo "% merge MYBRANCH1 to MYBRANCH1_1" filterpath cvscall -Q update -P -jMYBRANCH1 +# carefully placed sleep to dodge cvs bug (optimization?) where it +# sometimes ignores a "commit" command if it comes too fast (the -f +# option in cvsci seems to work for all the other commits in this +# script) +sleep 1 echo xyzzy > foo.txt -cvsci -m "merge1" +cvsci -m "merge1+clobber" foo.txt echo "% return to trunk and merge MYBRANCH1_2" cvscall -Q update -P -A filterpath cvscall -Q update -P -jMYBRANCH1_2 -cvsci -m "merge2" +cvsci -m "merge2" foo.txt REALCVS=`which cvs` echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat $TESTDIR/test-convert-cvsnt-mergepoints.rlog; exit 0; fi; done; $REALCVS \$*" > ../cvs