[rfc] Readonly/mirror branches

Martin Pool mbp at sourcefrog.net
Mon May 8 06:06:51 BST 2006


On 06/05/2006, at 12:55 AM, John Arbash Meinel wrote:

> I've been thinking about my workspace, and I have a bunch of  
> mirrors of
> other people's projects. And I was thinking that it would be nice to
> mark all of those mirrors as non-committable, but that I can update  
> them
> from their parents.
> (So pull is allowed, but commit is not).
>
> For example, I might mirror someones plugin locally, and then create a
> checkout in ~/.bazaar/plugins
> I don't really want to be able to commit there, since I wouldn't  
> want to
> mess up my mirror.
>
> I'm not sure what the best solution is. I did try to do "bzr bind
> readonly+sftp://host/path/bzr.dev/" and I found that you can't bind  
> to a
> readonly branch. For whatever reason it tries to lock the remote  
> branch.
> (I'm assuming it is trying to push any missing changes over, though  
> the
> trees are in sync).

There's a bug open about (presumably) the same thing in the context  
of checkout.  Robert says it is indeed due to trying to take a lock  
on the remote branch.  There's no conceptual reason why you shouldn't  
be able to get a checkout or bound copy of a remote branch.

Is there anything needed for really good mirroring beyond just making  
it readonly?

(One thing would be remembering all of the branches that potentially  
need to be pushed & pulled before going offline.)

> Anyway, I just wanted to hear comments from people to see if a mirror
> flag might be worthwhile. Readonly is probably too strong, since I do
> want to be able to update it.

I would also want to prevent myself accidentally pushing into that  
branch.  Having a readonly binding would probably do it.

The 'readonly+' url decorator seems like a fairly reasonable UI for  
it -- you can see how to turn it on and off by rebinding.

-- 
Martin







More information about the bazaar mailing list