lock on checkout inside repository

William Dode wilk-ml at flibuste.net
Fri Oct 6 09:38:45 BST 2006


On 06-10-2006, John Arbash Meinel wrote:
>
> William Dode wrote:
>> Hi,
>> 
>> When i make a checkout inside the same repository, i cannot commit (on 
>> current bzr.dev) :
>> 
>> wilk at domino:/tmp$ bzr init-repo --tree repo
>> wilk at domino:/tmp$ bzr init repo/main
>> wilk at domino:/tmp$ bzr checkout repo/main repo/bug
>> wilk at domino:/tmp$ cd repo/bug
>> wilk at domino:/tmp/repo/bug$ touch a
>> wilk at domino:/tmp/repo/bug$ bzr add a
>> added a
>> wilk at domino:/tmp/repo/bug$ bzr commit -m "a"
>> Unable to obtain lock file:///tmp/repo/.bzr/repository/lock
>> held by wilk at flibuste.net on host domino [process #20945]
>> locked 0 seconds ago
>> Will continue to try until 12:59:52
>> 
>> There is no problem when i checkout outside the repo.
>> 
>
> So the specific problem is that when you create a checkout it is binding
> the checkout to the master branch, such that committing in one, actually
> commits to the other one.
>
> And if they are sharing a repository, that causes problems because both
> of them want to grab a write lock.
>
> I can see this as a bug, but also have to wonder why you are doing it.
> It would seem that if you are creating a 'repo/main' => 'repo/bug' you
> really want 'bzr branch' not 'bzr checkout'.
>
> Can you explain what you are trying to do?

I hunt bug !

But the name bug for the checkout was not a good example...

I've somes project that i use in others projects (somes libraries), 
i keep one branch for each version and i actualy checkout inside the 
target projects to collect them.

repo/mylib
          /lib
          /doc

projectX/extlib/mylib (co from mylib)
                     /lib
                     /doc
        /lib/mylib --> ../extlib/mylib/lib
        
Then i had this idea to create the checkout in the same repository as 
the original library project and make a symlink of this checkout in the 
target project.
Like that i gain place, i can see in the repository how much project use 
this libraries and i can symlink only a part of the tree.

repo/mylib
          /lib
          /doc
    /mylibforX (co from mylib)
    /mylibforY (co from mylib)

projectX/lib/mylib --> /repo/mylibforX/lib

of course i can use branch for this, but i thought that checkout was 
more explicit...

-- 
William Dodé - http://flibuste.net





More information about the bazaar mailing list