]> thyrsus.com Git - rcs-fast-import.git/commitdiff
Preserve merge and extension-property metadata.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 15 Nov 2010 19:02:43 +0000 (14:02 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 15 Nov 2010 19:02:43 +0000 (14:02 -0500)
rcs-fast-import
rcs-fast-import.xml

index e649d9394a4725f047772bcda1dcb5cc994d5060..5258d3908bb35673cae4c2d6b1e249bddd207f83 100755 (executable)
@@ -219,6 +219,7 @@ class Commit:
         return filter(lambda e:e.mark in self.parent_marks,self.repo.commits()) 
     def is_tip(self):
         "Is this commit a branch tip?"
+        # Added for rcs-fast-import
         for child in self.children():
             if child.branch == self.branch:
                 return False
@@ -243,6 +244,10 @@ class Commit:
                 msg["Property-" + hdr] = value
         if empty_properties:
             msg["Empty-Properties"] = ",".join(empty_properties)
+        # This is added for rcs-fast-import
+        msg["Mark"] = self.mark
+        if self.parent_marks:
+            msg["Parents"] = ", ".join(self.parent_marks)
         msg.set_payload(self.comment)
         return msg.as_string(False)
 
@@ -269,6 +274,7 @@ class Repository:
         self.branches = set([])
         self.import_line = 0
         self.basedir = os.getcwd()
+    # __enter and __exit__ added for rcs-fast-import
     def __enter__(self):        
         return self
     def __exit__(self, type, value, traceback):
@@ -500,6 +506,7 @@ class Repository:
                 self.import_line = 0
             self.readtime = time.time()
             # Resolve tags and branches
+            # Added for rcs-fast-import
             for event in self.events:
                 if isinstance(event, Tag):
                     for commit in self.commits():
index 684de341638ffcb8a61ff635b56dc83f7a40b09d..3e275ca15db90f2f0aeab421037c41c9368c12ee 100644 (file)
 stdin into individual RCS master files in RCS subdirectories of the
 corresponding directory structure.</para>
 
-<para>Normally, committer and author data are written into each comment as
-RFC-822 mail headers, followed by a blank line.  The -p option suppresses
-this, producing a plain RCS comment.</para>
+<para>Normally, all import-stream per-commit metadata that RCS cannot
+represent natively is written into each comment as RFC-822 mail
+headers, followed by a blank line; this includes mark, committer and
+author data, mark cross-references to parent commits, and extension
+properties. The -p option suppresses this, producing a plain RCS
+comment.</para>
 
 <para>With the -v option, emit a twirling-baton prompt during stream read and
 do not suppress progess messages from the RCS tools.</para>
@@ -65,10 +68,7 @@ has the value of the corresponding RCS branch identifier for that file.</para>
 <refsect1 id='bugs'><title>BUGS</title>
 <para>The following limitations are inherent in the RCS format:</para>
 
-<para>RCS has no way to represent merges.  Accordingly, the information
-in import-stream <command>merge</command> commands is lost.</para>
-
-<para>Annotated tags cannot be preseved in a format readily accessible
+<para>Annotated tags cannot be preserved in a format readily accessible
 to RCS. This tool deposits them as tagged revisions of a file named
 <filename>ANNOTATED-TAGS</filename> in the toplevel RCS
 directory.</para>