Where is "all" data stored; so which .bzr dire may be removed?

Matthew D. Fuller fullermd at over-yonder.net
Fri Jul 31 11:15:04 BST 2009


On Thu, Jul 30, 2009 at 07:41:35PM +0200 I heard the voice of
ALbert Mietus, and lo! it spake thus:
>
> My first question: does the shared-.bzr dir also holds "all".

That question can't really be answered; it's too broad (or too
narrow).

All bzr data goes in a bzrdir (.bzr).  Fundamentally, there are 3
types of bzr entities:

1) There are revisions, the individual snapshots in the history.
   These go in a repository.
2) There are branches, which are basically pointers into the revision
   space, saying "these are the bits of history in this branch".
3) There are working trees, which are where you edit files and do
   stuff.  The bzr data here is meta-information like "what the base
   revision is" and "how the unaltered files look" (speaking very
   roughly).

(3) corresponds to the CVS/ directories in a CVS checkout, except that
there's only one at the root of the tree, rather than one in each
directory.  (1) and (2) roughly correspond to $CVSROOT and entities
within it.  The primary difference to grasp from CVS is that the
branch is the primary entity to be concerned with.


> If so,  then I should be allowed to delete all other .bzr dirs in
> subdirs of that shared repository

Generally, you probably shouldn't delete a .bzr dir unless you're also
deleting the dir around it.


> If so, how can I re-create those brances.

Deleting a _branch_ by itself doesn't destroy [much] data; the
revisions are still in the repository.  Of course, if it's a
standalone branch, the repository is in the same .bzr/ dir, so
you'd've thrown that away too.  If you still know the head rev, you
can recreate much of the branch state and move forward.  If you don't,
there may be various ways to guess.


> Meaning: get a working dir  (the lastest version in that branch).

Getting a working dir _is_ a distinct operation from getting a branch,
though UI-wise they often happen at the same time.



In the case of your particular layout here:

> 	.../TryOut/.bzr

This is likely to be a shared repository.  All the branches within use
this for their revision storage.  Think of it as a giant bucket, with
all the individual revisions floating around in it without any
necessary structure.


> 	 .../TryOut/branches/Apple_Darkroom/.bzr
> 	 .../TryOut/branches/Apple_Goldenrod/.bzr
> 	 .../TryOut/branches/HEAD/.bzr

These are three branches.  HEAD would be the CVS head, and the other
two would be from like-named CVS branches.  If either or both of them
has been merged into HEAD (which couldn't have been translated from
CVS, revision-wise, but the file contents at least would be), they
wouldn't have any information that HEAD wouldn't already have
(technically, being a branch, HEAD doesn't _have_ any information, it
just _points to_ some in the repository).  But if not, they don't, so
would need to be individually preserved.


> 	 .../TryOut/tags/GAM20071219/.bzr
> 	 .../TryOut/tags/GAM20080201/.bzr

These are translated from CVS tags, but (due to the way cvsps-import
works) are actually also bzr branches, with the head rev of each
branch being the revision that the tag actually applies to (insert
here necessary caevets about the actual situations CVS creates).  This
is sorta the same thing that SVN does with its "tags", which is wht
cvsps-import sets things up like this.  There's no reason these
couldn't be actual tags in the branches that have those revs though,
other than "cvsps-import doesn't do that".  You could add them
manually by matching up revids (not a big deal since there's only
two).



What I would do is 'branch' out the dirs from the
cvsps-import--created repository into my own workspace (possibly with
a shared repo there if necessary) and use them from there going
forward.  How you lay out the branches in that workspace is all up to
you.

Then I either delete or tar up the cvsps-import repo after I'm done.
That's just personal preference, however; you could move the whole
thing (TryOut/) into place if it's not already and work in there, I
just prefer treating it as a temporary staging area for the
translation.



-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.



More information about the bazaar mailing list