do_or_die("rcs -q -U -kb -i {0} </dev/null && mv {0},v {1}".format(arg, repodir))
def checkin(self, arg, comment):
"Check in a commit, with comment."
- # Relies on caller to escape comment string
- do_or_die("ci -l -m{1} {0}".format(arg, comment))
+ # Relies on caller to escape comment string. By unlocking the
+ # file before checkin we invoke the following property
+ # described on the rcs(1) manual page: "If rev is omitted and
+ # the caller has no lock, but owns the file and locking is not
+ # set to strict, then the revision is appended to the default
+ # branch (normally the trunk; see the -b option of rcs(1))."
+ # This is the behavior we want and why locking is set to non-strict.
+ do_or_die("rcs -q -U -u {0},v && ci -l -m{1} {0}".format(arg, comment))
def checkout(self, arg, revision):
"Check out a revision. Leaves it writeable."
do_or_die("rm -f {0} && rcs -q -u {0},v && co -q -l{1} {0}".format(arg, revision))