From 4ce5360fb98286bf5e2e08949fa8c0964d6c6fe5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 11 Nov 2010 11:56:32 -0500 Subject: [PATCH] Since we preserve attribution in comment, simplify some logic. --- rcs-fast-import | 19 +------------------ rcs-fast-import.xml | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/rcs-fast-import b/rcs-fast-import index 642532c..369749b 100755 --- a/rcs-fast-import +++ b/rcs-fast-import @@ -35,18 +35,6 @@ as to maximize access to the unpacked history. The -n option sets dry-run mode; parse the import stream, then go through all logic other than actually creating files. Useful for debugging in combination with -v. - -R file operations rename corresponding RCS master files; C file operations -copy them. - -If D, R, or C operations are present, the conversion will not -round-trip properly (that is, the file structure after rcs-fast-export -| rcs-fast-import won't be an exact copy) with differences near -deleted, renamed, and copied files. - -Warning: All tag metadata other than the name will be lost. The date -imputed to commits is from the author metadata if that exists, otherwise -from the committer metadata. """ import sys, os, getopt, re, cStringIO, subprocess, shutil @@ -599,17 +587,12 @@ class RCS: os.link(copyfile, path) except OSError: raise FatalException("refusing to step on %s." % path) - responsible = event.authors[0] or event.committer if roundtrip: comment = event.email_out() else: comment = event.comment command = "ci -l" - # If we were going to try to match committer or author - # email addresses to local names, this would be the place - # to do it. Not a whole lot of point in trying, though. - #command += " -w%s" % responsible.email - command += " -d'%s'" % responsible.date.rfc822() + command += " -d'%s'" % event.committer.date.rfc822() command += ' -m"%s"' % comment.replace('"', '\\"') command += " " + path + " " + RCS.master(path) do_or_die(command, "checkin") diff --git a/rcs-fast-import.xml b/rcs-fast-import.xml index a9d5184..474fc45 100644 --- a/rcs-fast-import.xml +++ b/rcs-fast-import.xml @@ -67,10 +67,21 @@ copy them. round-trip properly (that is the file structure after , rcs-fast-export | rcs-fast-import won't be an exact copy) with differences near deleted, renamed, and copied files. + + +BUGS +This tool has not been tested with RCS versions earlier than 5.7. +It is likely they will throw errors on some tag and branch names that +are legal in fast-import files. + +In each commit, the committer date entered in RCS metadata will +be the committer date from the import stream, but the committer +identity will be lost; all commits are checked in as if by the +invoking user and identified with the invoking user's login name. +However, complete attribution is preserved in comment headers unless +the -p option was selected. -Warning: All tag metadata other than the name will be lost. The date -imputed to commits is from the author metadata if that exists, otherwise -from the committer metadata. +All annotated-tag metadata other than its name will be lost. ERROR RETURNS -- 2.43.0