[MERGE] Refactor commit to prepare for population by tree walking

Ian Clatworthy ian.clatworthy at internode.on.net
Fri Jun 29 06:24:21 BST 2007


This patch refactors the commit code so that it's ready for populating
the new revision inventory by using an iter_changes like iterator across
the working tree. The current way of building the revision inventory -
by walking the working tree inventory - is still there but it is
abstracted behind a method.

An initial implementation of the preferred direction
(populate_using_tree()) is included but it is not currently called in
the production code. To be precise, the call to it is commented out
because I think it needs more testing. On the positive front, if the new
method is called, only one test out of the 6980 fails, and that's
because of a unicode normalisation issue that the production code is
failing to trigger. FWIW, a simple commit on a Mozilla size tree in my
VM also drops in time from 70 secs to 50 secs without any additional
smarts beyond the change in iterator. More importantly though, the new
iterator will allow much larger gains beyond that soon.

With the (potential) change in iterator though comes less information on
total tree size. The progress bar has therefore been changed to show
"Directory n" instead of "Entry n/m". I've also put the visual progress
bar back following feedback from Aaron on the drop in usability. The
progress bar steps in terms of stages. The first of those stages is
still the longest (so it's not as useful as it could be) but that stage
will improve a *lot* before my work on commit will be done.

Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit-prepare-populate-alternatives.patch
Type: text/x-patch
Size: 22155 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070629/44677a21/attachment.bin 


More information about the bazaar mailing list