From 5f1ac162a02b067771a98cf143ebf73d4aa1bae6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 13 Nov 2010 22:47:02 -0500 Subject: [PATCH] Instrumentation for branch debugging. --- rcs-fast-import | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rcs-fast-import b/rcs-fast-import index cdde124..0762826 100755 --- a/rcs-fast-import +++ b/rcs-fast-import @@ -677,8 +677,6 @@ class RCS(Generic): def checkin(self, commit, comment, op, path): "Check in a new revision - also used to create new masters." # This is the only manipulation of the branch structure there is. - if verbose >= DEBUG_BRANCHING: - print "commit", commit.branch if not os.path.exists(self.master(path)): myrev = "1.1" else: @@ -772,7 +770,14 @@ if __name__ == '__main__': except OSError: raise FatalException("Couldn't create working directory.") repo.fast_import(sys.stdin, progress=verbose>0) + lastcommit = None for event in repo.commits(): + if verbose >= DEBUG_BRANCHING: + if not lastcommit or lastcommit.branch != event.branch: + print "commit", event.branch + else: + print "commit" + lastcommit = event vcs.precommit(event) for op in event.fileops: if op.op == "M": -- 2.43.0