From e5d7eb695942c844fb617d61f613c965eda7bbed Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 11 Nov 2010 12:51:46 -0500 Subject: [PATCH] Better handling of copies. --- rcs-fast-import | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rcs-fast-import b/rcs-fast-import index 288e560..679d923 100755 --- a/rcs-fast-import +++ b/rcs-fast-import @@ -614,12 +614,13 @@ class RCS: # than doing nothing. os.rename(RCS.master(op.source), RCS.master(op.target)) def copy(self, source, target): - "Perform RCS copies." - # The copy will get the original's history. - # There's a case that what we ought to do instead - # is check out the tip rev and use it to initialize - # a new master. - shutil.copy(RCS.master(source), RCS.master(target)) + "Perform RCS copies. Start the copy with no history" + uphere = os.path.basename(target) + do_or_die("co %s" % RCS.master(source), "copy checkout") + os.rename(source, here) + do_or_die("ci -i -m'Copy of %s' -l %s %s" + % (source, uphere, RCS.master(target))) + os.remove(uphere) def checkout(self, switch): "Post-conversion actions." if switch != '-l': -- 2.43.0