Stacked branching question

Martin Pool mbp at canonical.com
Mon Jul 21 09:49:19 BST 2008


On Mon, Jul 21, 2008 at 6:08 PM, Nicholas Allen
<nick.allen at onlinehome.de> wrote:
> Does it really depend on the source branch being available for all
> operations? I thought that at least commit would work without *any*
> access to the source branch. I also hoped that log etc would work but
> only show you the revisions it has locally if the source branch is not
> available (with some indication that it is not showing those revisions
> because of this).

It may not be required for all operations, but there's no guarantee
you'll be able to do anything without it.  At present when you branch
with --stacked the new branch has no history in it at all.  When you
go to commit, we'll want to look at previous file texts to do delta
compression and at the moment that will "unthinkingly" go to the
backing repository.

I would like in the future to have a mode of operation where it either
initially fills the local repository with at least a full copy of the
previous revision, or can do the commit knowing that the previous
copies are there and therefore not storing deltas.  But we don't have
that in this release.

>
> I hope that my assumptions are correct and it is just an error in the
> help text.
>
> I tried to experiment myself to find out but got this error:
>
> ~ bzr branch --stacked  http://bazaar-vcs.org/bzr/bzr.dev
> bzr: ERROR: The repository
> 'file:///tmp/bzr.dev/.bzr/repository/'(<RepositoryFormatKnitPack1>) is
> not a stackable format. You will need to upgrade the repository to
> permit branch stacking.
>
> I was also under the impression (perhaps incorrectly) that stacked
> branching would work on any source branch. But if the source is the
> wrong format then shouldn't the error be that the source is the wrong
> format instead of trying to create a branch and then give the error that
> the destination is the wrong format?

Thanks for trying it out.  Yes, it should be possible to stack on any
format, but there is a difficulty in how the stacked branch is created
that means the origin must be a format supporting stacking.  I'm
working on that now and it will be fixed in 1.6 rc1.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list