Shallow branches question

Nicholas Allen nick.allen at onlinehome.de
Wed Mar 12 04:56:28 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I was wondering if it makes more sense to abstract away the concept of a
shallow branch completely so the user does not need to know or care
about it. My understanding is that a shallow branch allows one to branch
without first downloading all the history so that you can get to work on
a project quickly and commit etc. (this is really the only disadvantage
of a DVCS compared to a central one). As far as  the user is concerned
this is how it should be anyway. They just want to branch and get to
work and not have to think "Should I create a shallow branch or a normal
branch?". When I branch I would like Bazaar to immediately give me a
working copy that I can commit to locally. The history of the branch can
be downloaded in a background process behind the scenes. When you do an
info Bazaar could tell you how much of the remote history you have.
Advanced users could limit this by setting a horizon but I would imagine
in 99% of the cases this would not be necessary.

It seems like the idea of a shallow branch is to get around a limitation
in the way Bazaar currently branches (by requiring all history first).
This is an implementation issue that users shouldn't really care about.
They just want to branch and whether it is a large project or a small
one they want to get to work quickly.

So if Bazaar's concept of how branches are created changed to fit with
the way the user wants to work (i.e. as soon as possible after branching
with ability to work offline) then there would be no need for a new
concept called shallow branches.

Or maybe I missed something...

Cheers,

Nick

Martin Pool wrote:
| On 12/03/2008, John Yates <jyates at netezza.com> wrote:
|> Martin Pool writes:
|>
|>  > With the current code, we try to access all the repositories,
|>  > so I believe it will just fail if the network is not accessible.
|>
|>
|> Such behavior seems mislabeled if it is exposed as a _shallow_
|>  branch capability.  It sounds to me more like a _lazy_ branch
|>  capability.  My expection, based solely on connotation of the
|>  term shallow, would be that once I request explicit construction
|>  of such a beast its future peregrinations would be limited to my
|>  prescribed horizon.
|
| I should have said that it is not called a shallow branch at the
| moment.  It is a stacked branch.  We can lay policy on top of it to do
| some of these things but as you can see there is considerable
| diversity in how people want to use it.
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH12J81+i51gqqEGkRAsgxAJ4011Io2+GXrIqcgMaK7mBwiz8VFgCdFfLM
a+S5LRywRUmTxZ/LeXeMSvo=
=Geqx
-----END PGP SIGNATURE-----



More information about the bazaar mailing list