Rev 3012: Use valid file-ids for dirstate tests. in http://people.ubuntu.com/~robertc/baz2.0/pack.read-locks

Robert Collins robertc at robertcollins.net
Wed Nov 21 22:16:29 GMT 2007


At http://people.ubuntu.com/~robertc/baz2.0/pack.read-locks

------------------------------------------------------------
revno: 3012
revision-id:robertc at robertcollins.net-20071121221620-lnx3jph93gfq2t03
parent: robertc at robertcollins.net-20071121215711-meep8d5qazsufllc
committer: Robert Collins <robertc at robertcollins.net>
branch nick: pack.read-locks
timestamp: Thu 2007-11-22 09:16:20 +1100
message:
  Use valid file-ids for dirstate tests.
modified:
  bzrlib/tests/test_dirstate.py  test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
=== modified file 'bzrlib/tests/test_dirstate.py'
--- a/bzrlib/tests/test_dirstate.py	2007-11-15 01:07:51 +0000
+++ b/bzrlib/tests/test_dirstate.py	2007-11-21 22:16:20 +0000
@@ -420,7 +420,7 @@
     def get_tree_with_a_file(self):
         tree = self.make_branch_and_tree('tree')
         self.build_tree(['tree/a file'])
-        tree.add('a file', 'a file id')
+        tree.add('a file', 'a-file-id')
         return tree
 
     def test_non_empty_no_parents_to_dirstate(self):
@@ -431,7 +431,7 @@
             (('', '', tree.get_root_id()), # common details
              [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
              ]),
-            (('', 'a file', 'a file id'), # common
+            (('', 'a file', 'a-file-id'), # common
              [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current
              ]),
             ])
@@ -450,7 +450,7 @@
              [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
               ('d', '', 0, False, rev_id), # first parent details
              ]),
-            (('', 'a file', 'a file id'), # common
+            (('', 'a file', 'a-file-id'), # common
              [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current
               ('f', 'c3ed76e4bfd45ff1763ca206055bca8e9fc28aa8', 24, False,
                rev_id), # first parent
@@ -478,7 +478,7 @@
               ('d', '', 0, False, rev_id), # first parent details
               ('d', '', 0, False, rev_id2), # second parent details
              ]),
-            (('', 'a file', 'a file id'), # common
+            (('', 'a file', 'a-file-id'), # common
              [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current
               ('f', 'c3ed76e4bfd45ff1763ca206055bca8e9fc28aa8', 24, False,
                rev_id), # first parent
@@ -1008,12 +1008,12 @@
             (('', '', 'TREE_ROOT'), [
              ('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
              ]),
-            (('', 'a file', 'a file id'), [
+            (('', 'a file', 'a-file-id'), [
              ('f', '1'*20, 19, False, dirstate.pack_stat(stat)), # current tree
              ]),
             ]
         try:
-            state.add('a file', 'a file id', 'file', stat, '1'*20)
+            state.add('a file', 'a-file-id', 'file', stat, '1'*20)
             # having added it, it should be in the output of iter_entries.
             self.assertEqual(expected_entries, list(state._iter_entries()))
             # saving and reloading should not affect this.
@@ -1038,7 +1038,7 @@
         state = dirstate.DirState.initialize('dirstate')
         try:
             self.assertRaises(errors.NotVersionedError, state.add,
-                'unversioned/a file', 'a file id', 'file', None, None)
+                'unversioned/a file', 'a-file-id', 'file', None, None)
         finally:
             state.unlock()
 
@@ -1115,7 +1115,7 @@
             (('', 'a dir', 'a dir id'), [
              ('d', '', 0, False, dirstate.pack_stat(dirstat)), # current tree
              ]),
-            (('a dir', 'a file', 'a file id'), [
+            (('a dir', 'a file', 'a-file-id'), [
              ('f', '1'*20, 25, False,
               dirstate.pack_stat(filestat)), # current tree details
              ]),
@@ -1123,7 +1123,7 @@
         state = dirstate.DirState.initialize('dirstate')
         try:
             state.add('a dir', 'a dir id', 'directory', dirstat, None)
-            state.add('a dir/a file', 'a file id', 'file', filestat, '1'*20)
+            state.add('a dir/a file', 'a-file-id', 'file', filestat, '1'*20)
             # added it, it should be in the output of iter_entries.
             self.assertEqual(expected_entries, list(state._iter_entries()))
             # saving and reloading should not affect this.



More information about the bazaar-commits mailing list