Repository referencing in command lines

Matthew D. Fuller fullermd at over-yonder.net
Sat Feb 11 12:11:43 GMT 2006


On Fri, Feb 10, 2006 at 06:08:07PM -0600 I heard the voice of
John A Meinel, and lo! it spake thus:
> Matthew D. Fuller wrote:
> > 
> > That I hadn't considered quite so much.  Reflexively, I draw back
> > from it a little bit, but I can't come up with a good reason why.
> > [...]
> 
> I'm not sure if I understand what you mean about 'siblings' versus
> 'modules'.

In CVS, the top-level directories in the repository define 'modules',
which are totally independent of each other.  They're just grouped
into one repository for convenience, not because they have any
relation to each other.  Now, on the one hand, this isn't (as I think
of it) so useful in bzr terms, since each _branch_ in the repository
is fairly independent.

But on the other hand, I've figured out one reason why I drew back
from it, without having a "modules" layer over the branch layer.  The
"problem" is that the repo has only a single namespace for branches.
If I'm working on two projects, libfoo and libbar, and each has a
branch called "main", it won't work; I'd have to call the branches
libfoo/main and libbar/main.  And each libfoo branch would have to
have libfoo as part of its name[0].  On the other hand, with a
"modules" layer above it, the branches could still be called just
"main", each being in a different module.  The idea of having to have
every branch name include the name of the project sits poorly with me.

Now, I say "problem" because it blows up that use-case.  It doesn't so
much matter if we just put each separate projects in its own
repository.  This is pretty much what you'd have to do with SVN too,
because all its paths share the same namespace (and revnos, etc).  If
that's the way bzr goes (which I understand it to be), I'll just have
to go that route; it's unsettling, because I like the idea of a repo
being "All my projects go in this one single place", but in the grand
scheme of things, it's hardly a big deal.


[0] Well, not "have to" of course, but for consistency and my own
    sanity in tracking what branches are what, it would.


> The problem is we don't really have repo: syntax. We have URL syntax.
> I'm pretty sure there are reasons why, if only because it is a fairly
> unified syntax, rather than implementing another custom syntax for bzr.
> (And it handles if bzr is working over sftp or http, etc).

Well, I'm using URL syntax in the middle piece there, to define where
the repository is.  My use of the repo: is to define a way to refer to
the repository and the branch as separate pieces; none of the rest of
you seem to want to do that, but it [repo:] may make more sense to you
if you keep in mind that that's my intent in using it.

I consider a branch name to be a name, not a path.  So, including it
in a URL (which is essentially a path) is a little confusing to me,
particularly when the name includes /'s and so looks like a path.

Listing them separately makes it easier to treat them separately.  For
instance, most of my work on a given project is probably going to be
in a single repository.  So if I've got a "foo.main" branch, and I've
been working on a feature in "foo.mindreading", I want to merge from
main by typing something like

    % bzr merge foo.main

I don't want to be typing

    % bzr merge sftp://me@server/home/fullermd/work/repos/foo/foo.main

If the two pieces are slapped together in one chain like that, it
becomes harder (mentally, if not programmatically) to refer to just a
single piece.  SVN, according to all the information I can find,
_requires_ you to always use these sort of full paths, and I hate
that.

This throws me with the 'aliases' idea, too.  I think of aliases as
replacing full things.  So, "repo:^foorepo:foo.main" makes sense
immediately to me, but "^foorepo/foo.main" takes a little more doing,
because it's not replacing something, so much as replacing part of
something.  I think of it in terms of shell aliases, or variables in
most programming language.


I'm getting the strong impression, though, that this is just my own
personal neurosis.


> I think my problem with SVN is that it mixes the working tree files
> with the branch names.

I think we're meaning the same thing here.   :)


> I think it is a natural punning. And prevents the "the branch is at
> 'foo', but it actually is the 'bar' branch."

I think of it more as "The branch is the 'bar' branch in the 'foo'
collection."


-- 
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