[Pkg-bazaar-commits] ./bzr/unstable r883: - more tests for detecting empty commits

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:20 UTC 2009


------------------------------------------------------------
revno: 883
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-07-11 13:29:50 +1000
message:
  - more tests for detecting empty commits
modified:
  bzrlib/selftest/whitebox.py
-------------- next part --------------
=== modified file 'bzrlib/selftest/whitebox.py'
--- a/bzrlib/selftest/whitebox.py	2005-07-11 03:27:43 +0000
+++ b/bzrlib/selftest/whitebox.py	2005-07-11 03:29:50 +0000
@@ -33,7 +33,26 @@
                           'commit without adding',
                           allow_empty=False)
 
-
+        b.commit('commit empty tree',
+                 allow_empty=True)
+
+        b.add('hello.txt')
+        
+        b.commit('commit first added file',
+                 allow_empty=False)
+        
+        self.assertRaises(EmptyCommit,
+                          b.commit,
+                          'commit after adding file',
+                          allow_empty=False)
+        
+        b.commit('commit pointless revision with one file',
+                 allow_empty=True)
+
+        b.add_pending_merge('mbp at 892739123-2005-123123')
+        b.commit('commit new merge with no text changes',
+                 allow_empty=False)
+        
 
 
 class ValidateRevisionId(TestBase):



More information about the Pkg-bazaar-commits mailing list