def checkout_method(*args):
"Refresh the working copy from the history file."
(revspec, args) = preamble("checkout", args)
- if revspec and len(revspec) > 1:
+ if revspec and revspec[0] != revspec[1]:
croak("checkout needs an empty or singleton revision spec")
for arg in args:
master = RCSLog(arg)
cat >testfile1 <<EOF
Now is the time
EOF
+cp testfile1 testrev1
src $TESTOPTS add testfile1 >/dev/null
check "add"
Now is the time
for all good men
EOF
+cp testfile1 testrev2
echo "Second comment" | src $TESTOPTS commit - testfile1 >/dev/null
check "commit with -"
for all good men
to come to the aid of foo
EOF
+cp testfile1 testrev3
echo "Third comment" >testfile4
src $TESTOPTS commit -f testfile4 testfile1 >/dev/null
diff testfile6 testfile7
check "oob revision spec check"
-# to do: checkout, tag, fast-export
+for rev in 1 2 3
+do
+ src $TESTOPTS checkout $rev testfile1 >/dev/null
+ check "revision $rev checkout test"
+ diff -u testrev${rev} testfile1
+ check "revision $rev content test"
+done
+
+# to do: tag, fast-export
# end