[bug] Repository.copy() copies inventory first
John A Meinel
john at arbash-meinel.com
Thu Feb 16 05:24:40 GMT 2006
I was trying to track down why 'bzr get' takes so long to display what
is going on. I think I found the reason, and at the same time, I found a
bug.
Here is the code for Repository.copy():
@needs_read_lock
def copy(self, destination):
destination.lock_write()
try:
destination.control_weaves.copy_multi(self.control_weaves,
['inventory'])
copy_all(self.weave_store, destination.weave_store)
copy_all(self.revision_store, destination.revision_store)
finally:
destination.unlock()
You can see that it copies inventory.weave first, which can take a long
time, and also shouldn't be done before it copies the rest of the weave
store. So I think this needs to be changed to put the inventory copy
after the weave copy.
And the other reason why nothing is displayed for far too long is that
we have the delay of listing the remote repository, and then the delay
of copying the repository weaves. (WeaveStore.copy_multi() has no
progress bar).
Attached is a patch which puts up a progress much earlier. I'm not
settled on printing 'listing files', but I definitely think we want
WeaveStore.copy_multi() to have a progress bar. We probably spend more
time there than we do everywhere else.
We still have a delay at the end, because we merge the contents into the
working directory, which has no progress indicator.
Anyway, attached is a patch which just tries to improve our current 'bzr
get' code. It shows a progress over sftp, we use a different code path
for http, but that uses the Fetcher which has the 'merge weave merge'
progress indicator right away.
John
=:->
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: branch-progress.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060215/d418f9df/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060215/d418f9df/attachment.pgp
More information about the bazaar
mailing list