-#!/usr/bin/env python2
+#!/usr/bin/env python
#
# src - simple revision control.
#
sys.stdout.write(("-" * (width - 1)) + "\n")
def checkout_method(*args):
+ "Refresh the working copy from the history file."
(revspec, args) = preamble("checkout", args)
if len(revspec) > 1:
croak("checkout needs an empty or singleton revision spec")
revision = "-r" + revlist[revspec[0]-1].revision
else:
croak("checkout cannot take a range")
- do_or_die("mv .src/{0},v . && rm {0} && co -l -r%s {0} && mv {0},v .src".format(arg, revision))
+ do_or_die("mv .src/{0},v . && rm -f {0} && co -l -r{1} {0} && mv {0},v .src".format(arg, revision))
announce("%s <- %d" % (arg, len(revlist)))
def cat_method(*args):
+ "Dump revision content to srandard output."
(revspec, args) = preamble("cat", args)
for arg in args:
revlist = log_capture(arg)