Rev 1877: Snapshot state in file:///home/robertc/source/baz/dirstate/

Robert Collins robertc at robertcollins.net
Fri Dec 8 03:19:43 GMT 2006


------------------------------------------------------------
revno: 1877
revision-id: robertc at robertcollins.net-20061208031936-be473da3cbfb05da
parent: robertc at robertcollins.net-20061016022012-cb1d5e37571785d7
committer: Robert Collins <robertc at robertcollins.net>
branch nick: WorkingTreeFormat4 as the default tree format.
timestamp: Fri 2006-12-08 14:19:36 +1100
message:
  Snapshot state
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	2006-10-16 02:20:12 +0000
+++ b/bzrlib/tests/test_dirstate.py	2006-12-08 03:19:36 +0000
@@ -280,6 +280,15 @@
     ### add a path via _set_data - so we dont need delta work, just
     # raw data in, and ensure that it comes out via get_lines happily.
 
+    def test_add_path_to_root_no_parents_all_data(self):
+        # The most trivial addition of a path is when there are no parents and
+        # its in the root and all data about the file is supplied
+        state = dirstate.DirState.initialize('dirstate')
+        self.build_tree(['a file'])
+        stat = os.lstat('a file')
+        # the 1*20 is the sha1 pretend value.
+        state.add('a file', 'a file id', 'file', stat, '1'*20)
+
 
 class TestGetLines(TestCaseWithTransport):
 




More information about the bazaar-commits mailing list