diff --git a/tests/test-convert-cvsnt-mergepoints b/tests/test-convert-cvsnt-mergepoints --- a/tests/test-convert-cvsnt-mergepoints +++ b/tests/test-convert-cvsnt-mergepoints @@ -17,8 +17,8 @@ cvscall() # -- 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 @@ cvscall -Q add foo 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 @@ cd cvswork 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 diff --git a/tests/test-convert-cvsnt-mergepoints.out b/tests/test-convert-cvsnt-mergepoints.out --- a/tests/test-convert-cvsnt-mergepoints.out +++ b/tests/test-convert-cvsnt-mergepoints.out @@ -4,25 +4,25 @@ cvs -f -Q -d *REPO* init cvs -f -Q checkout -d cvsworktmp . cvs -f -Q add foo cvs -f -Q add foo.txt -cvs -f ci -m foo.txt +cvs -f ci -f -m add foo.txt foo.txt initial revision: 1.1 % checkout #2: create MYBRANCH1 and modify foo.txt on it cvs -f -Q checkout -d cvswork foo cvs -f -q rtag -b -R MYBRANCH1 foo cvs -f -Q update -P -r MYBRANCH1 -cvs -f ci -m bar +cvs -f ci -f -m bar foo.txt new revision: 1.1.2.1; previous revision: 1.1 -cvs -f ci -m baz +cvs -f ci -f -m baz foo.txt new revision: 1.1.2.2; previous revision: 1.1.2.1 % create MYBRANCH1_2 and modify foo.txt some more cvs -f -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo cvs -f -Q update -P -r MYBRANCH1_2 -cvs -f ci -m bazzie +cvs -f ci -f -m bazzie foo.txt new revision: 1.1.2.2.2.1; previous revision: 1.1.2.2 % create MYBRANCH1_1 and modify foo.txt yet again cvs -f -q rtag -b -R MYBRANCH1_1 foo cvs -f -Q update -P -r MYBRANCH1_1 -cvs -f ci -m quux +cvs -f ci -f -m quux foo.txt new revision: 1.1.4.1; previous revision: 1.1 % merge MYBRANCH1 to MYBRANCH1_1 rcsmerge: warning: conflicts during merge @@ -31,7 +31,7 @@ RCS file: *REPO*/foo/foo.txt,v retrieving revision 1.1 retrieving revision 1.1.2.2 Merging differences between 1.1 and 1.1.2.2 into foo.txt -cvs -f ci -m merge1 +cvs -f ci -f -m merge1+clobber foo.txt new revision: 1.1.4.2; previous revision: 1.1.4.1 % return to trunk and merge MYBRANCH1_2 cvs -f -Q update -P -A @@ -40,7 +40,7 @@ RCS file: *REPO*/foo/foo.txt,v retrieving revision 1.1 retrieving revision 1.1.2.2.2.1 Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt -cvs -f ci -m merge2 +cvs -f ci -f -m merge2 foo.txt new revision: 1.2; previous revision: 1.1 collecting CVS rlog 7 log entries