From a2bc6c4750f494ab2caf78683fba005f13980061 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 12 Nov 2010 18:10:33 -0500 Subject: [PATCH] Generalize copy operation. --- rcs-fast-import | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) -- 2.43.0