Repository head:
There is a public repository on Gitorious
+ All the initially projected commands except branch are impplemented.
The bug that caused filures with vi has been fixed.
".." is a legal range separator as well as "-".
- More documentation.
+ There is a regression-test suite, and more documentation.
0.1: 2014-11-07
Initial proof-of-concept release.
except TypeError, ValueError:
croak("garbled date %s" % self.date)
+def master(arg):
+ return os.path.join(repodir, arg + ",v")
+
class RCSLog:
"Encapsulate a revision list and some methods on it"
def __init__(self, name):
self.name = name
self.revlist = []
self.symbols = {}
+ if not os.path.exists(master(self.name)):
+ croak("%s is not registered" % self.name)
with popen_or_die("cd %s >/dev/null; rlog %s 2>/dev/null; cd ..>/dev/null" % (repodir, name)) as fp:
self.revlist = []
self.lockrevs = []
for arg in args:
if not os.path.exists(arg):
croak("I see no '%s' here." % arg)
- elif os.path.exists("%s/%s,v" % (repodir, arg)):
+ elif os.path.exists(master(arg)):
croak("%s is already registered." % arg)
else:
do_or_die("rcs -q -kb -i {0} </dev/null && mv {0},v {1}".format(arg, repodir))
for arg in args:
if not os.path.exists(arg):
croak("I see no '%s' here." % arg)
- elif not os.path.exists("%s/%s,v" % (repodir, arg)):
+ elif not os.path.exists(master(arg)):
croak("%s is not registered." % arg)
else:
if not comment:
if revspec is not None:
croak("can't accept a revision-spec when deleting tags.")
for arg in args:
- with lifted(arg):
- do_or_die("rcs -n{0} {1}".format(tagname, arg))
+ master = RCSLog(arg)
+ if tagname not in master.symbols:
+ croak("%s is not a tag in %s" % (tagname, arg))
+ else:
+ with lifted(arg):
+ do_or_die("rcs -n{0} {1}".format(tagname, arg))
def set_tags(args):
if not args: