in RFC-822-style headers on log comments unless the -p (plain) option
is given, in which case this metadata is discarded.
+src release ['file'...]
+ Release locks on files. This is never necessary in a normal workflow,
+ which will be repeated edit-commit cycles, but it may be handy if you
+ have to interoperate with other tools that expect RCS masters to be
+ in their normal (unlocked) stare.
+
The omission of 'src remove' is a deliberate speed bump.
"""
if not os.path.exists(source):
croak("I see no '%s' here." % source)
elif not os.path.exists(backend.master(source)):
- croak("%s is not registered, skipping." % source)
+ croak("%s is not registered, skipping" % source)
elif os.path.exists(backend.master(target)):
croak("%s is registered, I won't step on it" % source)
elif os.path.exists(target):
"Copy a file and its history."
filecmd("copy", backend.copy, args)
+def release_method(*args):
+ "Release locks."
+ (revspec, args) = preamble(legend, args)
+ if revspec is not None:
+ croak("release doesn't take a revision spec")
+ for arg in args:
+ if not os.path.exists(arg):
+ croak("I see no '%s' here." % arg)
+ elif not os.path.exists(backend.master(arg)):
+ croak("%s is not registered, skipping" % arg)
+ else:
+ backend.release(arg)
+
def ls_method(*args):
"List registered files."
if args:
"cp": copy_method,
"fast-export": fast_export_method,
"fast-import": fast_import_method,
+ "release": release_method,
}
class RCS:
do_or_die("cp {0} {1} && cp {2} {3}".format(source, target,
self.master(source),
self.master(target)))
- def diff(diffspec1, diffspec2, diffopts, arg):
+ def diff(self, diffspec1, diffspec2, diffopts, arg):
"Report a diff."
# The || : suppresses the error return from diff(1)
if diffspec1:
if diffspec2:
diffspec2 = "-r" + diffspec1
do_or_die("rcsdiff -q {0} {1} {2} || :".format(diffspec, diffopts, arg),loud=True)
+ def release(self, arg):
+ "Release locks."
+ do_or_die("rcs -q -u {0},v".format(arg))
if __name__ == "__main__":
command = list(sys.argv[1:])
in RFC-822-style headers on log comments unless the -p (plain) option
is given, in which case this metadata is discarded.
+src release ['file'...]::
+ Release locks on files. This is never necessary in a normal workflow,
+ which will be repeated edit-commit cycles, but it may be handy if you
+ have to interoperate with other tools that expect RCS masters to be
+ in their normal (unlocked) stare.
+
The omission of 'src remove' is a deliberate speed bump.
If no files are specified, all eligible files are operated on in sequence.