Demonstration Help.

Colin D Bennett colin at gibibit.com
Thu Feb 19 21:20:25 GMT 2009


On Thu, 19 Feb 2009 09:58:35 -0800
Eric Berry <elberry at gmail.com> wrote:

> Thank you all for the help and advice. A couple of questions follow.
> 
> 
> 1. Shared Repositories
> >
> > I know you're focusing on centralised but if you cover local branches
> > consider the following
> >
> > 2. Keeping a clean mirror of upstream
> >
> > If your devs want to separate the area of their drive for upstream
> > mirrors and local branches from the work areas then talk about
> > tree-less branches, no-trees in repositories and switching between
> > branches in lightweight checkouts.
> >
> 
> I apologize for my noobyness, I'm still new to bzr.  I'm unfamiliar with
> this, what exactly is upstream in this context, and how do shared repos help
> keep it clean? I started doing more research into shared repos after you
> mentioned them, I thought they were more or less just a way to minimize file
> system resources, is this correct?

A common idea is that you can keep a shared repository on your local
disk where all the branches live.  Branches store revision data and
history.  If the branches in the shared repository are “tree-less”,
then that means there is no working tree on disk in addition to the
actual revision data in the branches.  This is the most space-efficient
way to store branches, since having a working tree on disk for every
branch is highly wasteful unless you absolutely need it (which is
almost never).

Then, you can do lightweight checkouts of these branches from the
shared repository, which makes a working tree that you can operate on.
To make branching cheap and fast, I often use a single main ”work”
checkout, which I then use ”bzr switch” to switch between branches that
I'm working on.  This is extremely fast since Bazaar then only has to
write files in the working tree that differ between the branch you are
switching from and the branch you are switching to.  It saves a ton of
disk space when you have a lot of branches you work on.

> 
> http://bazaar-vcs.org/SharedRepositoryTutorial
> 
> One question coming from that tutorial. Regarding, "Shared Repositories
> Without Trees" - I got the impression from this section that shared repos
> without trees allow users with write access to the server to modify and
> commit things from the server? Is this correct?

Lightweight checkouts are similar to SVN checkouts but are different.
SVN checkouts store a second full text copy of every file, essentially
making each SVN checkout take twice the disk space necessary.  Bazaar
lightweight checkouts do not store excess data in the checkout working
tree, since the branch is responsible for storing the revision data.

A lightweight checkout is *only* a working tree -- meaning it has no
history itself, but refers to a branch that does contain history.


> > On general working-tree management, point out the true-renames and the
> > ability to apply them after the actual change
> >
> > EG
> > $ move a.txt b.txt
> > $ bzr mv --after a.txt b.txt
> 
> 
> Nice! I will definitely bring this up. I also wanted to bring up the easy
> repo switching using bind and unbind. Is it correct to assume these
> functions are safe to use in this situation? Eg. Bob, Jeff, and Sally are
> coworkers. Jeff and Sally have both branched off of Bob's branch. If Bob
> quits, Jeff can simply unbind his branch from Bob's, and then bind it to
> Sally's. Correct?
> 
> One more question regarding lightweight checkouts. These are like checkouts
> from an SVN repository correct? In the bzr user guide it says, "Of course,
> many of the benefits of a normal checkout are lost by doing this but that's
> a tradeoff you can make if and when it makes sense." What exactly are lost
> benefits? Just the history? Does that mean if I do a "bzr log" on a file, I
> won't see anything? Or will it (like SVN) go to the remote repository to
> retrieve it?
> http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html#getting-a-lightweight-checkout

The downside of a lightweight checkout *over the network* is that no
history or revision data is stored locally.  I think this is what the
User Guide is getting at.  You don't lose any data, but you are
essentially accessing the remote branch for all operations on the
branch.

Using lightweight checkouts of tree-less branches which are located on
a local disk drive is an effective way to use lightweight checkouts.
There is no overhead in this case since the branch data (revisions and
history) is still stored on the local machine, but you get the benefit
that you can delete the lightweight checkout (like with 'bzr zap') when
you're done working on something, and then save disk space; all the
actual branch revision data remains stored in the branch itself, not in
the lightweight checkout.

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090219/fa2e5359/attachment.pgp 


More information about the bazaar mailing list