Rev 5886: Comment why we can't trivially optimize the same-path case. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941
John Arbash Meinel
john at arbash-meinel.com
Thu May 19 15:15:29 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941
------------------------------------------------------------
revno: 5886
revision-id: john at arbash-meinel.com-20110519151519-0p4f1yrn1co5ol1g
parent: john at arbash-meinel.com-20110519150825-sp71o82yxs356qoi
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-set-parent-trees-delta-282941
timestamp: Thu 2011-05-19 17:15:19 +0200
message:
Comment why we can't trivially optimize the same-path case.
-------------- next part --------------
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py 2011-05-19 15:08:25 +0000
+++ b/bzrlib/dirstate.py 2011-05-19 15:15:19 +0000
@@ -1543,6 +1543,13 @@
deletes.append((old_path_utf8, None, file_id, None, True))
elif (old_path, new_path) == root_only:
# change things in-place
+ # Note: the case of a parent directory changing its file_id
+ # tends to break optimizations here, because officially
+ # the file has actually been moved, it just happens to
+ # end up at the same path. If we can figure out how to
+ # handle that case, we can avoid a lot of add+delete
+ # pairs for objects that stay put.
+ # elif old_path == new_path:
changes.append((old_path_utf8, new_path_utf8, file_id,
inv_to_entry(inv_entry)))
else:
More information about the bazaar-commits
mailing list