]> thyrsus.com Git - rcs-fast-import.git/commitdiff
We now store amnnotated tags in a round-trippable form.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 11 Nov 2010 19:35:13 +0000 (14:35 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 11 Nov 2010 19:35:13 +0000 (14:35 -0500)
Makefile
rcs-fast-import
rcs-fast-import.xml

index 5eb34d423bb98c2328abd8c6d4dbc638ee9d885c..05ae43b3b844739124d22e925f465c0ccf9e5b98 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,32 +1,32 @@
 #
-# makefile for rcs-fast-export
+# makefile for rcs-fast-import
 #
-VERS=$(shell sed <rcs-fast-export -n -e '/version=\(.*\)/s//\1/p')
+VERS=$(shell sed <rcs-fast-import -n -e '/version=\(.*\)/s//\1/p')
 
-SOURCES = README COPYING rcs-fast-export rcs-fast-export.xml Makefile control
+SOURCES = README COPYING rcs-fast-import rcs-fast-import.xml Makefile control
 
-all: rcs-fast-export.1
+all: rcs-fast-import.1
 
-rcs-fast-export.1: rcs-fast-export.xml
-       xmlto man rcs-fast-export.xml
+rcs-fast-import.1: rcs-fast-import.xml
+       xmlto man rcs-fast-import.xml
 
-rcs-fast-export.html: rcs-fast-export.xml
-       xmlto html-nochunks rcs-fast-export.xml
+rcs-fast-import.html: rcs-fast-import.xml
+       xmlto html-nochunks rcs-fast-import.xml
 
 clean:
        rm -f  *~ *.1 *.html *.tar.gz MANIFEST SHIPPER.*
        rm -fr .rs* typescript test/typescript
 
-rcs-fast-export-$(VERS).tar.gz: $(SOURCES) rcs-fast-export.1 
-       @ls $(SOURCES)rcs-fast-export.1 | sed s:^:rcs-fast-export-$(VERS)/: >MANIFEST
-       @(cd ..; ln -s rcs-fast-export rcs-fast-export-$(VERS))
-       (cd ..; tar -czvf rcs-fast-export/rcs-fast-export-$(VERS).tar.gz `cat rcs-fast-export/MANIFEST`)
-       @(cd ..; rm rcs-fast-export-$(VERS))
+rcs-fast-import-$(VERS).tar.gz: $(SOURCES) rcs-fast-import.1 
+       @ls $(SOURCES) rcs-fast-import.1 | sed s:^:rcs-fast-import-$(VERS)/: >MANIFEST
+       @(cd ..; ln -s rcs-fast-import rcs-fast-import-$(VERS))
+       (cd ..; tar -czvf rcs-fast-import/rcs-fast-import-$(VERS).tar.gz `cat rcs-fast-import/MANIFEST`)
+       @(cd ..; rm rcs-fast-import-$(VERS))
 
 version:
        @echo $(VERS)
 
-dist: rcs-fast-export-$(VERS).tar.gz
+dist: rcs-fast-import-$(VERS).tar.gz
 
-release: rcs-fast-export-$(VERS).tar.gz rcs-fast-export.html
+release: rcs-fast-import-$(VERS).tar.gz rcs-fast-import.html
        shipper -u -m -t; make clean
index 679d92347b356b495762ed4b175eff356f9fd231..fb9c7168858af7eebf4b09c34a88475878d25d10 100755 (executable)
@@ -170,10 +170,8 @@ class Tag:
         self.committish = committish
         self.tagger = tagger
         self.comment = content
-    def email_out(self, eventnum):
-        "Enable do_mailbox_out() to report these."
+    def email_out(self):
         msg = email.message.Message()
-        msg["Event-Number"] = str(eventnum+1)
         msg["Tag-Name"] = self.name
         if self.tagger:
             self.tagger.email_out(msg, "Tagger")
@@ -228,7 +226,6 @@ class Commit:
                 return False
         return True
     def email_out(self):
-        "Enable do_mailbox_out() to report these."
         msg = email.message.Message()
         if self.authors:
             self.authors[0].email_out(msg, "Author")
@@ -603,8 +600,15 @@ class RCS:
                     announce("removing %s" % (path,))
                 if not dryrun:
                     os.remove(path)
+        # Save annotated tags for round-tripping
         for tag in event.taglist:
+            with file("RCS/ANNOTATED-TAGS", "w") as fp:
+                fp.write(tag.email_out())
+            do_or_die("ci -l -m'Annotated tag %s' -d'%s' RCS/ANNOTATED-TAGS,v"
+                      % (tag.name, tag.tagger.date.rfc822()))
+            os.remove("RCS/ANNOTATED-TAGS")
             do_or_die("rcs -n'%s': %s" % (tag.name, " ".join(RCS.rcsfiles())))
+        # FIXME: Someday, do real branch structure here.
         if event.is_tip():
             do_or_die("rcs -n'%s': %s" % (event.branch, " ".join(RCS.rcsfiles())))
     def rename(self, source, target):
index a643fc9bfc6beca454fea9620ee1c0d5cf7827dc..511982587c1ff36ab8d3988972b5edd84a2b2836 100644 (file)
@@ -68,10 +68,15 @@ initialize a new file.</para>
 <refsect1 id='bugs'><title>BUGS</title>
 <para>The following limitations are inherent in the RCS format:</para>
 
+<para>Annotated tags cannot be preseved 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>
+
 <para>If D or R operations are present in the import stream, 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 and renamed.</para>
+differences near deleted and renamed files.</para>
 
 <para>In each commit, the committer date entered in RCS metadata will
 be the committer date from the import stream, but the committer
@@ -93,8 +98,6 @@ fixed in a future release:</para>
 5.7.  It is likely older versions will throw errors on some tag and
 branch names that are legal in fast-import files.</para>
 
-<para>All annotated-tag metadata other than the tag name will be lost.</para>
-
 <para>Branch structure in the input stream is not yet mapped to RCS
 branches.  Round-tripping will fail if the history in the import 
 stream was not linear.</para>