[RFC] prohibit push to lightweight checkout
Martin Pool
mbp at canonical.com
Mon May 3 00:43:28 BST 2010
On 1 May 2010 01:57, Alexander Belchenko <bialix at ukr.net> wrote:
> Hi,
>
> As I'm using colo plugin more and more, I'm getting more and more
> lightweight checkouts on different machines. Unfortunately due to design
> decision behind lightweight checkouts it's almost impossible to push from
> one machine to another if master branch of lightweight checkout is on the
> same machine where checkout resides. Even more if user have similar branch
> on his local machine then I suspect bzr will *incorrectly* open local branch
> instead of remote one.
>
> Therefore I think any actions which required write access to lightweight
> checkout should be prohibited to avoid user confusion and undesirable
> effects of changing the branch behind user back.
So in terms of Bazaar's model:
A lightweight checkout is a tree pointing to a separate branch.
push first fetches revisions as necessary into the branch's
repository, then updates the branch's tip. It doesn't (according to
the help) update the working tree.
update moves the working tree basis pointer and then merges in the
changes to that point.
I would guess that when you push to a lightweight checkout, it updates
the checkout's branch's tip, then if possible updates the lightweight
checkout?
So what is the design decision that causes a problem? It sounds like
it is that the checkout stores a local-file URL to its branch, which
can't safely be opened from another machine.
Therefore it seems to me like what we actually want to forbid is
trying to open a file:// url relative to a non-local URL? Or perhaps
we could start by giving a warning in that case?
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list