Rev 2379: Remove direct access to Dirstate prefering dirstate.Dirstate in http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

John Arbash Meinel john at arbash-meinel.com
Fri Feb 23 15:14:05 GMT 2007


At http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

------------------------------------------------------------
revno: 2379
revision-id: john at arbash-meinel.com-20070223151256-g1imdh471lwffdzs
parent: john at arbash-meinel.com-20070223150732-bjo6ava5jclmkjg3
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate-alt
timestamp: Fri 2007-02-23 09:12:56 -0600
message:
  Remove direct access to Dirstate prefering dirstate.Dirstate
modified:
  bzrlib/tests/test_dirstate.py  test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
-------------- next part --------------
=== modified file 'bzrlib/tests/test_dirstate.py'
--- a/bzrlib/tests/test_dirstate.py	2007-02-23 15:07:32 +0000
+++ b/bzrlib/tests/test_dirstate.py	2007-02-23 15:12:56 +0000
@@ -19,7 +19,6 @@
 import os
 
 from bzrlib import dirstate, errors
-from bzrlib.dirstate import DirState
 from bzrlib.memorytree import MemoryTree
 from bzrlib.tests import TestCaseWithTransport
 
@@ -380,13 +379,13 @@
             tree1.unlock()
         expected_result = [], [
             (('', '', root_id), [
-             ('d', '', 0, False, DirState.NULLSTAT)])]
+             ('d', '', 0, False, dirstate.DirState.NULLSTAT)])]
         state = dirstate.DirState.initialize('dirstate')
         try:
             state.set_state_from_inventory(inv)
-            self.assertEqual(DirState.IN_MEMORY_UNMODIFIED,
+            self.assertEqual(dirstate.DirState.IN_MEMORY_UNMODIFIED,
                              state._header_state)
-            self.assertEqual(DirState.IN_MEMORY_MODIFIED,
+            self.assertEqual(dirstate.DirState.IN_MEMORY_MODIFIED,
                              state._dirblock_state)
         except:
             state.unlock()
@@ -474,7 +473,7 @@
             self.assertEqual(['ghost-rev'], state.get_ghosts())
             self.assertEqual(
                 [(('', '', root_id), [
-                  ('d', '', 0, False, DirState.NULLSTAT),
+                  ('d', '', 0, False, dirstate.DirState.NULLSTAT),
                   ('d', '', 0, False, revid1),
                   ('d', '', 0, False, revid2)
                   ])],
@@ -508,7 +507,7 @@
         # check the layout in memory
         expected_result = [revid1.encode('utf8'), revid2.encode('utf8')], [
             (('', '', root_id), [
-             ('d', '', 0, False, DirState.NULLSTAT),
+             ('d', '', 0, False, dirstate.DirState.NULLSTAT),
              ('d', '', 0, False, revid1.encode('utf8')),
              ('d', '', 0, False, revid2.encode('utf8'))
              ]),



More information about the bazaar-commits mailing list