Rev 2940: Review feedback. in http://people.ubuntu.com/~robertc/baz2.0/commit.deleted-paths-speed
Robert Collins
robertc at robertcollins.net
Tue Nov 27 01:55:37 GMT 2007
At http://people.ubuntu.com/~robertc/baz2.0/commit.deleted-paths-speed
------------------------------------------------------------
revno: 2940
revision-id:robertc at robertcollins.net-20071127015529-4inebdo4aa2bfatv
parent: robertc at robertcollins.net-20071024223742-fhjlj7l6lu77s9zq
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit.deleted-paths-speed
timestamp: Tue 2007-11-27 12:55:29 +1100
message:
Review feedback.
modified:
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py 2007-10-24 22:37:42 +0000
+++ b/bzrlib/commit.py 2007-11-27 01:55:29 +0000
@@ -705,6 +705,8 @@
report_changes = self.reporter.is_verbose()
deleted_ids = []
+ # A tree of paths that have been deleted. E.g. if foo/bar has been
+ # deleted, then we have {'foo':{'bar':{}}}
deleted_paths = {}
# XXX: Note that entries may have the wrong kind because the entry does
# not reflect the status on disk.
@@ -726,12 +728,10 @@
deleted_dict = deleted_paths
for segment in path_segments:
deleted_dict = deleted_dict.get(segment, None)
- if deleted_dict is None:
- # We took a path not present in the dict.
- break
if not deleted_dict:
- # We've reached an empty child dir in the dict, so are now
- # a sub-path.
+ # We either took a path not present in the dict
+ # (deleted_dict was None), or we've reached an empty
+ # child dir in the dict, so are now a sub-path.
break
else:
deleted_dict = None
More information about the bazaar-commits
mailing list