From 1a238e04bcc161f1d8937b016fb40105e84fce0c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 11 Nov 2014 15:55:50 -0500 Subject: [PATCH] Rewrite branch-to-base more cleanly. Regressuin test passes. --- src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src b/src index a2e1786..03e7b50 100755 --- a/src +++ b/src @@ -985,6 +985,9 @@ class RCS: if item.revision == rev: return metadata[i].revno return None + def branch_to_base(self, revid): + "Go from a branch ID sticky tag to the revision it was based on." + return self.joinrev(self.splitrev(revid)[:-2]) def add(self, arg): "Register a file" # Key choices here: -b suppresses all keyword expansion, -U sets @@ -1158,9 +1161,6 @@ class RCS: #print "\t%d revisions" % len(metadata.revlist) print "\tlockrevs:", metadata.lockrevs print "\tsymbols:", metadata.symbols - def branch_to_base(self, revid): - "Go from a branch ID sticky tag to the revision it was based on." - return ".".join(revid.split(".")[:-2]) if __name__ == "__main__": try: -- 2.43.0