Rev 139: Don't do any work when nothing has changed. in http://bazaar.launchpad.net/%2Bbranch/bzr-history-db

John Arbash Meinel john at arbash-meinel.com
Tue May 31 09:40:26 UTC 2011


At http://bazaar.launchpad.net/%2Bbranch/bzr-history-db

------------------------------------------------------------
revno: 139
revision-id: john at arbash-meinel.com-20110531094008-43i8x9acs9k1u4xh
parent: john at arbash-meinel.com-20110531085241-yy9447wxus836ej9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: bzr-history-db
timestamp: Tue 2011-05-31 11:40:08 +0200
message:
  Don't do any work when nothing has changed.
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2011-05-31 07:47:39 +0000
+++ b/__init__.py	2011-05-31 09:40:08 +0000
@@ -262,6 +262,10 @@
 
 def _history_db_post_change_branch_tip_hook(params):
     """Run when the tip of a branch changes revision_id."""
+    if params.new_revid == params.old_revid:
+        # Stuff like 'bzr up' can trigger a post_change when nothing actually
+        # changes. Just ignore it.
+        return
     t0 = time.clock()
     import pprint
     # TODO: This requires a round-trip to the remote server to find out whether



More information about the bazaar-commits mailing list