]> thyrsus.com Git - rcs-fast-import.git/commitdiff
Instrumentation for branch debugging.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 14 Nov 2010 03:47:02 +0000 (22:47 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 14 Nov 2010 03:47:02 +0000 (22:47 -0500)
rcs-fast-import

index cdde124b1ed153fbf203536f0934ac5aa4e0a90a..0762826ce81d7fa0c8bdc9036b6b01d39fc98589 100755 (executable)
@@ -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":