Mercurial vs. Bazaar speedtest clone and log - update: hg 1.1 vs. bzr 1.10
Alexander Belchenko
bialix at ukr.net
Fri Dec 19 16:41:27 CST 2008
Brendan Cully пишет:
> On Monday, 15 December 2008 at 09:31, Alexander Belchenko wrote:
>> Alexander Belchenko пишет:
>>> I'm curious why you have this warning message in your test.sh output:
>>>
>>> No handlers could be found for logger "bzr"
>>>
>>> It seems like your system lacks something. Is it intended?
>>> Or you just don't have desire to get bzr working right?
>>>
>>> Also, it will be nice to know does you run pre-packaged version of bzr
>>> (actually I'd like to make sure that you run bzr with compiled C-extensions)
>>> and what version of python you're using. AFAIK bzr is not completelly ported
>>> to Python 2.6 (but I could be wrong here).
>>>
>>> To make local cloning of of bzr much faster you'd need to use shared repositories.
>>> So you can change your steps for bzr as following.
>>>
>>> 1) Initial cloning:
>>>
>>> time bzr init-repo .
>> Correction. I guess bzr repo comes from bzr-svn conversion,
>> so shared repo format should be explicitly defined as rich-root-pack:
>>
>> time bzr init-repo . --rich-root-pack
>
> How exactly do these shared repositories work? It sounds like they
> would be similar to symlinking .hg into a new directory, a la
> http://www.selenic.com/mercurial/wiki/index.cgi/SharedRepoExtension ?
Not exactly. In bzr there is 3 separate objects: repository, branch and working tree.
Repository is a storage for revisions and file texts. Branch is the pointer to
the history, and working tree manages dirstate file (used to detect changed files).
The .bzr control directory can have inside all 3 objects (repo, branch, working tree).
In this case it's very close to standard hg repo.
But also it's possible to initialize shared repository that will have only repository object inside.
In this case all branches created inside shared repository will share that repository object.
It's not symlinking per se. So if you delete the branch from shared repository by rmdir command
its history still be present in repository. But if you delete repository you lose history
of all underlying branches.
> Can you cleanly delete the history of repository when using the shared
> format?
In hg you call it repository, but in bzr that's called branches.
No, there is no builtin command to prune unneeded history from shared repository.
But history is filtered on branch/pull operation, so you can
create new empty shared repository and pull all interesting branches there. In this case
old unneeded history from old shared repo will not pollute new one.
BTW, this history filtering feature is the one of things that make clone operation in bzr
so slow. It's probably is not main reason, but it has some effect. From other side one know
that it's possible to get clean copy without old junk simply by cloning the branch.
More information about the Mercurial
mailing list