Rev 2476: Workaround WorkingTree4 not having a native remove() in test_cat. in http://bazaar.launchpad.net/~bzr/bzr/dirstate

Robert Collins robertc at robertcollins.net
Thu Mar 1 08:51:08 GMT 2007


At http://bazaar.launchpad.net/~bzr/bzr/dirstate

------------------------------------------------------------
revno: 2476
revision-id: robertc at robertcollins.net-20070301085003-1k4kx7hxz8ce5x8p
parent: robertc at robertcollins.net-20070301084414-h302pw7vt7wllqb6
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate
timestamp: Thu 2007-03-01 19:50:03 +1100
message:
  Workaround WorkingTree4 not having a native remove() in test_cat.
modified:
  bzrlib/tests/blackbox/test_cat.py test_cat.py-20051201162916-f0937e4e19ea24b3
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'bzrlib/tests/blackbox/test_cat.py'
--- a/bzrlib/tests/blackbox/test_cat.py	2006-12-13 08:15:54 +0000
+++ b/bzrlib/tests/blackbox/test_cat.py	2007-03-01 08:50:03 +0000
@@ -73,6 +73,9 @@
         try:
             tree.add(['a-rev-tree', 'c-rev', 'd-rev'])
             tree.commit('add test files')
+            # remove currently uses self._write_inventory - 
+            # work around that for now.
+            tree.flush()
             tree.remove(['d-rev'])
             tree.rename_one('a-rev-tree', 'b-tree')
             tree.rename_one('c-rev', 'a-rev-tree')

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2007-03-01 00:47:45 +0000
+++ b/bzrlib/workingtree.py	2007-03-01 08:50:03 +0000
@@ -2506,9 +2506,9 @@
         return self.get_format_string()
 
 
-__default_format = WorkingTreeFormat3()
+__default_format = WorkingTreeFormat4()
 WorkingTreeFormat.register_format(__default_format)
-WorkingTreeFormat.register_format(WorkingTreeFormat4())
+WorkingTreeFormat.register_format(WorkingTreeFormat3())
 WorkingTreeFormat.set_default_format(__default_format)
 # formats which have no format string are not discoverable
 # and not independently creatable, so are not registered.



More information about the bazaar-commits mailing list