Rev 2467: Alternate fix for 'absent' entries. in http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/status_after_merge_110256

John Arbash Meinel john at arbash-meinel.com
Thu Apr 26 22:11:26 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/status_after_merge_110256

------------------------------------------------------------
revno: 2467
revision-id: john at arbash-meinel.com-20070426211112-0m9z4fr9vzjo25zy
parent: john at arbash-meinel.com-20070426204553-sfw4mo98pxggdrfm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: status_after_merge_110256
timestamp: Thu 2007-04-26 16:11:12 -0500
message:
  Alternate fix for 'absent' entries.
  This also handles 'renamed' entries properly.
  Basically, when we get a path which happens to match a dirstate entry
  check to see if the entry is considered 'live'.
  If it isn't, then we treat it as a non-match, which allows
  later checks to properly handle the file on disk.
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-04-25 22:07:09 +0000
+++ b/bzrlib/workingtree_4.py	2007-04-26 21:11:12 +0000
@@ -2289,16 +2289,39 @@
                                            result[7],
                                           )
                             advance_path = False
+                    elif current_entry[1][target_index][0] in 'ar':
+                        # The path matches, but the current entry is marked as
+                        # not being here. So we don't want to consider this
+                        # as a match. We still need to process the current
+                        # entry, though.
+                        advance_path = False
+                        path_handled = False
+                        for result in _process_entry(current_entry, None):
+                            if (include_unchanged
+                                or result[2]                    # content change
+                                or result[3][0] != result[3][1] # versioned status
+                                or result[4][0] != result[4][1] # parent id
+                                or result[5][0] != result[5][1] # name
+                                or result[6][0] != result[6][1] # kind
+                                or result[7][0] != result[7][1] # executable
+                                ):
+                                yield (result[0],
+                                       (utf8_decode_or_none(result[1][0]),
+                                        utf8_decode_or_none(result[1][1])),
+                                       result[2],
+                                       result[3],
+                                       result[4],
+                                       (utf8_decode_or_none(result[5][0]),
+                                        utf8_decode_or_none(result[5][1])),
+                                       result[6],
+                                       result[7],
+                                      )
                     else:
                         for result in _process_entry(current_entry, current_path_info):
                             # this check should probably be outside the loop: one
                             # 'iterate two trees' api, and then _iter_changes filters
                             # unchanged pairs. - RBC 20070226
-                            if current_entry[1][target_index][0] == 'a':
-                                advance_path = False
-                                path_handled = False
-                            else:
-                                path_handled = True
+                            path_handled = True
                             if (include_unchanged
                                 or result[2]                    # content change
                                 or result[3][0] != result[3][1] # versioned status



More information about the bazaar-commits mailing list