Branching from just a part of a repository?

Vincent Ladeuil vila+bzr at canonical.com
Fri Aug 31 16:02:16 UTC 2012


>>>>> Stefan Monnier <monnier at iro.umontreal.ca> writes:

    >> Ghost revisions will be enough as long as the (file-id, revision-id)
    >> full texts are available (which should already be supported).

    > But that would hide the history of non-hidden files.
    > Committing the files into a fresh new branch already gives you that.

Ha damn, yeah, you're right, that would require deeper changes to the
model.

On the other hand, even without the full history, you should still be
able to merge without running into the 'parallel imports' horrors
(i.e. as long as you have the common ancestor the merge should still
succeed).

    >> I.e. for this use case, you need a way to 'blacklist' all revisions
    >> before the split and some way (a bit more tricky) to forbid (or control)
    >> files outside of the split to come back.

    > If you really only want to hide some "tail" of the history, you can
    > already do that: make a stacked branch and keep the tail of the
    > branch secret (so any attempt to fetch some earlier part of history
    > would simply get something like a network error).

Right, that's worth trying, I'm not sure there won't be bugs in using
such branches nor how easy you can, by mistake, re-add some revisions
in the stacked repository you wanted to hide when you have access to the
stacked-on repository.

As a more general use case, I was thinking about the ability to hide
parts of the ancestry graph so you can, for example, give a branch with
only the versions for the mainline to production while keeping merged
revisions in dev branches.

        Vincent



More information about the bazaar mailing list