[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] renaming branches

From: Jeremy Fincher
Subject: Re: [Monotone-devel] renaming branches
Date: Thu, 17 Feb 2005 11:48:26 -0500

On Feb 17, 2005, at 4:19 AM, Richard Levitte - VMS Whacker wrote:

In message <address@hidden> on Thu, 17 Feb 2005 03:06:47 -0500, Jeremy Fincher <address@hidden> said:

jemfinch> >  - make each database maintain a 1:1 mapping between
jemfinch> >    branch ID and human-readable name
jemfinch> I'm not sure if this is necessary, or if it's a good thing
jemfinch> to enforce.  People *will* pick duplicate branch names.
jemfinch> There is no doubt in my mind that many people will have
jemfinch> branches named "bugs" or "main" or "dev", etc.  No matter
jemfinch> how many times we say, "Pick a globally unique name!" people
jemfinch> still will not do so.  I think, rather than have the
jemfinch> database *enforce* unique human-readable names, we should
jemfinch> instead have the user disambiguate such collisions himself.
jemfinch> Of course, this wouldn't be very user-friendly if the user
jemfinch> had to disambiguate branch names *every* time, so I suggest
jemfinch> that we cache the user's decision in some way that's easily
jemfinch> editable/readable by the user: either a dotfile in his home
jemfinch> directory or a file in MT/.  We could keep a mapping of
jemfinch> human-readable names to random ids, and use that first when
jemfinch> we're given a branch name by the user.

I think that's a horrible idea.  After all, part of a distributed SCM
is to facilitate communication, and being able to communicate to
others where a certain functionality resides with a name that's easy
to remember is quite important.  What you seem to suggest is that one
should communicate something like "You will find piping functionality
for monotone in branch 889faa6869f6748215632214ed3d43f3058de59d", and
then everyone interested would have to remember to hack MT/branches or
something like that.

Not at all! What I'm suggesting is that we use *almost* the same system that is used now; that is, each person picks a name for his branch, and we call these branches by those names. Except that in the scheme both graydon and I propose, each branch also has a random token that is guaranteed to *uniquely* identify it among branches. I'm only suggesting that the user ever deal with these random tokens when there are collisions in branch names -- that is, when there are two branches named "stable" and the user asks to update to a branch named "stable." In that case, the user will have to pick one or the other, and I'm suggesting that monotone cache their choice in MT/branches or something similar.

And then, there's those of us who sometimes want
to browse the database with monotone-viz or 'monotone agraph | xvcg -',
and would then have to deal with figuring out what functionality hides
behind each non-descriptive branch ID.

Of course not! Such tools would use the human-readable name for the branch.

(Although it's interesting that this seems so distasteful when we're stuck referring to individual revisions by their SHA1 hash, rather than a nice human-readable name like 1.21 or something)

jemfinch> We could use the same scheme for mapping public key
jemfinch> human-readable names to the actual public key.

You do know, don't you, that those names are in the database, right?

Of course; I'm just concerned with handling ambiguity, when two people, rather than using their email address, put their public key in their database as "JohnSmith" or something similar.

Right now, as I understand it, Monotone doesn't handle ambiguity between branch names or RSA keys *at all*. I'm not suggesting anything that would change the common case (where there is no ambiguity), but only something that would work in the cases where there is ambiguity (by duplicate branch names or duplicate RSA key names). A nice additional feature, I think, is that users will then be able to have aliases (nicknames, I like to call them :)) for branches and RSA keys.

(It's worth noting, I think, that part of the reason I want to resolve the "branch names must be globally unique" issue is that I find a branch name like net.venge.monotone to be a tad long and somewhat unintuitive; that is, of course, only my opinion.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]