Rev 5787: catch a couple more cases in http://bazaar.launchpad.net/~jameinel/bzr/2.4-revert-faster-759096
John Arbash Meinel
john at arbash-meinel.com
Thu Apr 14 14:58:46 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-revert-faster-759096
------------------------------------------------------------
revno: 5787
revision-id: john at arbash-meinel.com-20110414145839-eq4h06513nc7u4lg
parent: john at arbash-meinel.com-20110414145425-z0yb5esnl672mv0l
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-revert-faster-759096
timestamp: Thu 2011-04-14 16:58:39 +0200
message:
catch a couple more cases
-------------- next part --------------
=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py 2011-04-14 14:54:25 +0000
+++ b/bzrlib/transform.py 2011-04-14 14:58:39 +0000
@@ -2846,8 +2846,8 @@
# than the target changes relative to the working tree. Because WT4 has an
# optimizer to compare itself to a target, but no optimizer for the
# reverse.
+ change_list = target_tree.iter_changes(working_tree,
# change_list = working_tree.iter_changes(target_tree,
- change_list = target_tree.iter_changes(working_tree,
specific_files=specific_files, pb=pb)
if target_tree.get_root_id() is None:
skip_root = True
@@ -2857,6 +2857,12 @@
deferred_files = []
for id_num, (file_id, path, changed_content, versioned, parent, name,
kind, executable) in enumerate(change_list):
+ # target_path, wt_path = path
+ # target_versioned, wt_versioned = versioned
+ # target_parent, wt_parent = parent
+ # target_name, wt_name = name
+ # target_kind, wt_kind = kind
+ # target_executable, wt_executable = executable
wt_path, target_path = path
wt_versioned, target_versioned = versioned
wt_parent, target_parent = parent
@@ -2892,7 +2898,7 @@
wt_name, parent_trans_id)
tt.adjust_path(backup_name, parent_trans_id, trans_id)
new_trans_id = tt.create_path(wt_name, parent_trans_id)
- if versioned == (True, True):
+ if wt_versioned and target_versioned:
tt.unversion_file(trans_id)
tt.version_file(file_id, new_trans_id)
# New contents should have the same unix perms as old
@@ -2926,9 +2932,9 @@
tt.set_executability(target_executable, trans_id)
elif target_kind is not None:
raise AssertionError(target_kind)
- if versioned == (False, True):
+ if not wt_versioned and target_versioned:
tt.version_file(file_id, trans_id)
- if versioned == (True, False):
+ if wt_versioned and not target_versioned:
tt.unversion_file(trans_id)
if (target_name is not None and
(wt_name != target_name or wt_parent != target_parent)):
More information about the bazaar-commits
mailing list