From: Eric S. Raymond Date: Tue, 11 Nov 2014 05:43:44 +0000 (-0500) Subject: Don't be tripped up by "branches: " metadata lines. X-Git-Tag: 0.5~27 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=27de88ade97dfc8bfb557d94b37e843eb86d44d5;p=src.git Don't be tripped up by "branches: " metadata lines. Regression test passes. --- diff --git a/src b/src index 2c1c152..f0e9638 100755 --- 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"