Rev 2928: Correct the check_pointless change to pass all tests. in http://people.ubuntu.com/~robertc/baz2.0/commit

Robert Collins robertc at robertcollins.net
Wed Oct 24 01:19:36 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/commit

------------------------------------------------------------
revno: 2928
revision-id:robertc at robertcollins.net-20071024001931-d080vqc683qdsvvp
parent: robertc at robertcollins.net-20071023071720-43qn6f048dvn95ew
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit
timestamp: Wed 2007-10-24 10:19:31 +1000
message:
  Correct the check_pointless change to pass all tests.
modified:
  bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2007-10-23 07:17:20 +0000
+++ b/bzrlib/commit.py	2007-10-24 00:19:31 +0000
@@ -422,8 +422,10 @@
             raise PointlessCommit()
         # If length == 1, then we only have the root entry. Which means
         # that there is no real difference (only the root could be different)
-        if len(self.builder.new_inventory) != 1 and (self.any_entries_changed
-            or self.any_entries_deleted):
+        # unless deletes occured, in which case the length is irrelevant.
+        if (self.any_entries_deleted or 
+            (len(self.builder.new_inventory) != 1 and
+             self.any_entries_changed)):
             return
         raise PointlessCommit()
 



More information about the bazaar-commits mailing list