From: Eric S. Raymond Date: Fri, 12 Nov 2010 23:10:33 +0000 (-0500) Subject: Generalize copy operation. X-Git-Tag: 0.1~37 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=a2bc6c4750f494ab2caf78683fba005f13980061;p=rcs-fast-import.git Generalize copy operation. --- diff --git a/rcs-fast-import b/rcs-fast-import index d6b30ef..70b8645 100755 --- a/rcs-fast-import +++ b/rcs-fast-import @@ -665,14 +665,14 @@ class RCS: do_or_die(command, legend.lower()) RCS.record("D", path) os.remove(path) - def copy(self, source, target): + def copy(self, source, target, legend="Copy"): "Perform RCS copies. Start the copy with no history." uphere = os.path.basename(target) - do_or_die("co %s" % RCS.master(source), "copy checkout") + do_or_die("co %s" % RCS.master(source), legend) os.rename(source, uphere) - do_or_die("ci -i -m'Copy of %s' -l %s %s" - % (source, uphere, RCS.master(target)), - "copy") + do_or_die("ci -i -m'%s of %s' -l %s %s" + % (legend, source, uphere, RCS.master(target)), + legend.lower()) RCS.record("C", source) RCS.record("T", target) os.remove(uphere)