Partial & shallow branches

Aaron Bentley aaron.bentley at utoronto.ca
Fri Aug 11 15:07:48 BST 2006


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

Alex J. Champandard wrote:
> Here's my problem; say a user downloads a minimal tarball (containing a
> small part of a "full release" repository).

I think you mean "working tree" not "repository"?  The repository is the
part of '.bzr' that contains all committed revisions.

> 1) A lightweight checkout seems to be the best candidate for storing in
> the tarball.  Once they are supported, it should be possible to convert
> this to a shallow branch without using any extra bandwidth.

No.  If it had enough information to do that, it would be a shallow
checkout.  Lightweight checkouts don't contain any past revisions, and a
shallow branch must contain at least the last-committed revision.

> (I was asked on IRC to add a
> use-case to http://bazaar-vcs.org/HistoryHorizon under "low contribution
> barrier", but I'm not sure if it's appropriate there.)

The suggestion of a manifest mechanism seems to be independant of
shallow branches.  Probably it deserves its own spec.

> Am I correct in
> assuming that there's currently no way to convert a lightweight checkout
> into a local branch without downloading the history from the original
> repository?

Since a lightweight checkout has no revisions, it's theoretically
impossible.

> 2) Is there a way to create a repository/working tree/checkout that
> contains only certain files from the original repository? I've not found
> a command that can do this, though I'm willing to implement my own.
> However, I'm not sure if there would be any issues with the storage
> format of the repository itself, or any quirks with other commands that
> wouldn't support such partial working trees...

Our model doesn't support checking out only part of a tree.  If you
check out only certain files, the missing files will be marked as
deleted when you commit.

I think supporting this is possible, but it would involve a lot of work.

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

iD8DBQFE3I800F+nu1YWqI0RAufYAJ9CcSgQ/6ALYo5T+ezzBh+WejuycQCcDT2X
fBs/VWfj5Gwp4ilE8l5rsYk=
=KWu0
-----END PGP SIGNATURE-----




More information about the bazaar mailing list