thoughts on repository/storage/branch/checkout

Denys Duchier duchier at ps.uni-sb.de
Wed Feb 1 23:19:46 GMT 2006


I have been trying to come to grips with the many concepts that have been
proposed and have to do with repository/storage/branch/checkout.  It is quite
possible that I have not understood it all properly, but, in this message, I'd
like to argue for a uniform way to decompose these concepts.  I am aware that my
decomposition may not be entirely in line with what has been proposed so far,
but it is very close and, I believe, occasionally (perhaps) more uniform.

I think there are 4 basic concepts:

    - STORE
    - BRANCH
    - CHECKOUT
    - WORKDIR

STORE
    separating this concept out makes possible shared storage.  A store
    currently collects two kinds of objects:

    - revisions
    - file weaves

BRANCH
    this concept represents a particular line of development. It is composed of
    two other notions:

    - store
    - branch data (e.g. history)

CHECKOUT
    this concept represents a concrete set of files and directories in a
    specific line of development.  It is composed of two other notions:

    - branch
    - workdir

    The workdir is where the (versioned) files are located.

WORKDIR
    this concept simply represents the location under which versioned files are
    to be found.  It is not, by itself, associated with any VCS data: a checkout
    is responsible for that.  The point is that it should be possible for
    workdirs of unrelated checkouts to overlap: they would normally version
    different files, but the directory trees could overlap.

The notion of REPOSITORY is (in my view) not fundamental, but rather a derived
notion (in a sense which I'll explain later).

Whenever a concept A depends on another concept B, there is the possibility
that:

    - B is local
    - B is dislocated
    - B is inherited

BRANCH
    a branch depends on a store and we must consider the 3 possibilities:

    - the store is local (STANDALONE BRANCH)
    - the store is dislocated (LIGHT BOUND BRANCH?)
    - the store is inherited (REPO BRANCH?)

CHECKOUT
    a checkout depends on a branch and on a workdir.  I don't really think that
    an inherited workdir is meaningful, but that still leaves 3*2 = 6
    possibilities:

    - the branch is local (STANDALONE CHECKOUT)
    - the branch is dislocated (CHECKOUT?)
    - the branch is inherited (weird)

    - the workdir is local (usual)
    - the workdir is dislocated (special case that I have been arguing for)
    - the workdir is inherited (very weird)

In my view, a repository should simply be a store and a set of inheriting
branches (inheriting from the store) - I believe that is essentially what has
been proposed so far.  I am not trying to downplay the importance of
repositories as a practical concept, but merely as a foundational concept: I
don't think that repositories are "primitive".

Have I completely misunderstood the proposal sofar, or is my recap in the
galactic neighbourhood of what's been discussed?

Cheers,

--Denys






More information about the bazaar mailing list