Rev 2436: Don't cache the parent entry for root, since it is different than all other entries. in http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

John Arbash Meinel john at arbash-meinel.com
Wed Feb 28 20:33:09 GMT 2007


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

------------------------------------------------------------
revno: 2436
revision-id: john at arbash-meinel.com-20070228203208-tgsw917qz1xresjx
parent: john at arbash-meinel.com-20070228193528-nvb31ekrgk046cv2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Wed 2007-02-28 14:32:08 -0600
message:
  Don't cache the parent entry for root, since it is different than all other entries.
modified:
  bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
-------------- next part --------------
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py	2007-02-28 19:35:28 +0000
+++ b/bzrlib/workingtree_4.py	2007-02-28 20:32:08 +0000
@@ -1611,9 +1611,10 @@
                     if source_parent_id == entry[0][2]:
                         # This is the root, so the parent is None
                         source_parent_id = None
-                    last_source_parent[0] = old_dirname
-                    last_source_parent[1] = source_parent_id
-                    last_source_parent[2] = source_parent_entry
+                    else:
+                        last_source_parent[0] = old_dirname
+                        last_source_parent[1] = source_parent_id
+                        last_source_parent[2] = source_parent_entry
 
                 new_dirname = entry[0][0]
                 if new_dirname == last_target_parent[0]:
@@ -1627,9 +1628,10 @@
                     if target_parent_id == entry[0][2]:
                         # This is the root, so the parent is None
                         target_parent_id = None
-                    last_target_parent[0] = new_dirname
-                    last_target_parent[1] = target_parent_id
-                    last_target_parent[2] = target_parent_entry
+                    else:
+                        last_target_parent[0] = new_dirname
+                        last_target_parent[1] = target_parent_id
+                        last_target_parent[2] = target_parent_entry
 
                 source_exec = source_details[3]
                 path_unicode = path.decode('utf8')



More information about the bazaar-commits mailing list