]> thyrsus.com Git - src.git/commitdiff
Don't be tripped up by "branches: " metadata lines.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 11 Nov 2014 05:43:44 +0000 (00:43 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 11 Nov 2014 05:43:44 +0000 (00:43 -0500)
Regression test passes.

src

diff --git a/src b/src
index 2c1c152f40cfa407f49228796e89661cbc2889ba..f0e9638cf32a34d59e416ed66b25ce7ce270f68f 100755 (executable)
--- a/src
+++ b/src
@@ -1071,13 +1071,13 @@ class RCS:
                         rev = fields[1]
                         metadata.symbols[name] = rev
                 elif state == "logheader":
-                    if line.startswith("revision"):
+                    if line.startswith("revision "):
                         fields = line.split()
                         metadata.revlist[-1].revision = fields[1]
                     elif line.startswith("----------------------------"):
                         metadata.revlist.append(RCSRevisionItem(metadata, maxrevno))
                         maxrevno += 1
-                    elif line.startswith("date"):
+                    elif line.startswith("date: "):
                         fields = line.split()
                         if pseudotime:
                             # Artificial date one day after the epoch
@@ -1089,6 +1089,8 @@ class RCS:
                                 date = date[:-1]
                             date = date.replace("/","-").replace(" ","T") + "Z"
                         metadata.revlist[-1].date = date
+                    elif line.startswith("branches:"):
+                        continue
                     elif line.startswith("======================="):
                         if not metadata.revlist[-1].log.endswith("\n"):
                             metadata.revlist[-1].log += "\n"