[RFC] make checkouts as much like bound branches as possible

Olaf Conradi oohlaf at gmail.com
Tue Mar 28 20:55:28 BST 2006


On 28/03/06, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Olaf Conradi wrote:
> > I thought the double binding already worked for lightweight checkouts..
> > I assumed the new change would go to both the new bound location and
> > the shared repository of the checkout.
>
> So, if you have
> ~/repo/bzr.dev <- repository branch
> ~/checkouts/bzr.dev <- lightweight checkout
>
> If you do
> $ cd ~/checkouts/bzr.dev
> $ bzr bind http://bazaar-vcs.org/bzr/bzr.dev
>
> That will bind ~/repo/bzr.dev to http://bazaar-vcs.org/bzr/bzr.dev
>
> Since this is http, you won't be able to commit, but you generally don't
> want to commit to bzr.dev-- you want to commit to branches of it.

My bad, meant to write sftp://blabla in an earlier post.

> > Just tested it by binding a lightweight checkout and committing, the
> > update only appeared in the bound branch, not repo.
>
> I am not sure what you mean.  It should update the branch you checked
> out from, and the branch you bound to.

I tested like this:

~/tmp/bazaar $ bzr init-repo repo
~/tmp/bazaar $ cd repo
~/tmp/bazaar/repo $ bzr init --format=metadir repobranch
~/tmp/bazaar/repo $ cd ..
~/tmp/bazaar $ mkdir tree
~/tmp/bazaar $ cd tree
~/tmp/bazaar/tree $ bzr checkout ../repo/repobranch checkout1
~/tmp/bazaar/tree $ cd checkout1
..aar/tree/checkout1 $ echo bar > foo
..aar/tree/checkout1 $ bzr add && bzr ci -m "foo"
added foo
added foo
- [                                                           ] fetch
phase 0/4Inventory ok.
Committed revision 1.
..aar/tree/checkout1 $ cd ..
~/tmp/bazaar/tree $ bzr branch ../repo/repobranch branch
Branched 1 revision(s).
~/tmp/bazaar/tree $ cd branch
..bazaar/tree/branch $ cat foo
bar
..bazaar/tree/branch $ cd ../checkout1
..aar/tree/checkout1 $ echo bados >> foo
..aar/tree/checkout1 $ bzr bind ../branch
..aar/tree/checkout1 $ bzr ci -m "barbados"
modified/renamed/reparented foo
- [                                                           ] fetch
phase 0/4Inventory ok.
Committed revision 2.
..aar/tree/checkout1 $ cd ../branch
..bazaar/tree/branch $ cat foo
bar
..bazaar/tree/branch $ bzr update
All changes applied successfully.
Updated to revision 2.
..bazaar/tree/branch $ cat foo
bar
bados
..bazaar/tree/branch $ cd ..
~/tmp/bazaar/tree $ bzr checkout --lightweight ../repo/repobranch checkout2
~/tmp/bazaar/tree $ cd checkout2
..aar/tree/checkout2 $ cat foo
bar
..aar/tree/checkout2 $ cd ../checkout1
..aar/tree/checkout1 $ cat foo
bar
bados
..aar/tree/checkout1 $ bzr status
..aar/tree/checkout1 $

I thought checkout2 would also contain both bar and bados inside foo.
But checkout1 also unbound from the shared repository:

..aar/tree/checkout1 $ bzr info --debug
   working.bzrdir = /home/olaf/tmp/bazaar/tree/checkout1/
    branch.bzrdir = /home/olaf/tmp/bazaar/tree/checkout1/
repository.bzrdir = /home/olaf/tmp/bazaar/tree/checkout1/
    branch.parent =
    branch.push   =
    branch.bound  = /home/olaf/tmp/bazaar/tree/branch/
   working.format = Bazaar-NG Working Tree format 3
    branch.format = Bazaar-NG branch format 5
repository.format = Bazaar-NG Repository format 7
repository.shared = False

..aar/tree/checkout2 $ bzr info --debug
   working.bzrdir = /home/olaf/tmp/bazaar/tree/checkout2/
    branch.bzrdir = /home/olaf/tmp/bazaar/repo/repobranch/
repository.bzrdir = /home/olaf/tmp/bazaar/repo/
    branch.parent =
    branch.push   =
    branch.bound  =
   working.format = Bazaar-NG Working Tree format 3
    branch.format = Bazaar-NG branch format 5
repository.format = Bazaar-NG Repository format 7
repository.shared = True


> > I tested the
> > binding and commiting before, but somehow missed that it did not
> > update the repo.
>
> > Jup :)
>
> Yay!

I thought the proxybranch would cease to support double binding, but
that never existed, so am ok with making checkouts and bound branch
the same.

Cheers,
 -Olaf




More information about the bazaar mailing list