monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] branch naming conventions


From: Zbynek Winkler
Subject: Re: [Monotone-devel] branch naming conventions
Date: Sun, 30 Oct 2005 22:59:30 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

Nathaniel Smith wrote:

The tricky bit is that at netsync time, we check to make sure that our
mapping is consistent with our peers mapping;
I do not think we need to do this with branches. When a user initiates netsync we get a pattern describing the branches to sync. We can expand the pattern locally and use the mapping to convert it to list of IDs. The netsync would sync the list of IDs --> no need to have the same mapping on each side (this is what the PetNames you mentioned above do). However we would need to add a special command to pull a new branch from a remote computer where would either use the remote symbolic name or the global branch ID (this would be the time to add this ID to the local mappings).
Okay.  I think you missed the main point I was talking about.
I think I did not. I just think it is not such a big deal/problem as you describe ;-)

We certainly _could_ do what you describe.  That part's no problem.

However, there is a problem: You and I might decide to use different
names for the same branch.  Or we might do so accidentally, like maybe
I pulled, then it got renamed on the server, then you pulled.

Okay, so this isn't actually a problem either, if you just look at it
alone. Here's what the actual problem is: names are used by people,
and people don't just sit at their computer and use their VCS and
that's all they do.  Actually, people spend a lot of time talking to
each other, in lots of different ways; a VCS tool needs to be useful
in that _ecology_ of collaboration, not just for the imaginary User
who sits alone in a room and just uses your program.
I agree with this part. The key word here is "being useful". Under "being useful" I understand something as "not get in the way to much" or not impose unnecessary restrictions on me or something like that. It does not have to be "perfect".

So, if we're talking, and I want to refer to a branch, how do I do
that so you understand?  There's a lot of possible solutions:
 -- use universal names, like now
 -- have both local names (human readable) and global names (not
    human readable); it's the responsibility of the people talking to
    choose which one to use in each case.  (This is what you
    propose.)
    -- problem: if local names are 90% consistent between users, then
       they will just use their local names when talking, which then
       is not reliable.
 -- have both local names (human readable) and global names (not
    human readable); have a software intermediary that lets us each
    use our local names but sneakily translates our messages so what
    we each see is consistent.  (This is a Pet Names system.)  Not
    viable here, because we have no way to control communications.
 -- have both local names (human readable) and global names (not
    human readable); have a quiet software mechanism in the
    background that works in-band to make sure the everyone likely to
    talk out-of-band already has consistent local names.  Now people
    can use local names when talking to each other all they want.
    (This is the possible solution I described.)

Am I being any more convincing?
A bit ;)

Do you see why I think consistency of
names is important?  What do you imagine happening, where today I
would tell someone on IRC "if you want to try it, check out the latest
head of net.venge.monotone.cvssync and build that"?  Should I be
saying "check out the latest head of
  73070030f7b0d0f3d4ee02545d45ca4bbe5e189f
and build that"?  Or if not, how do I know the person I'm talking to
understands?
Well, you have to say where it is available anyway. So you just say "check out the latest
head available at venge.net under the branch monotone.cvssync".

<OT>
What exactly is "latest head of a branch" anyway? What if the branch is discontinuous? Does it appear to have multiple heads even when it actully does not?
branch1        branch2      branch2 & branch1
 revA  ------> revB ------------> revC
What if I do not have branch2 in my database? The branch2 could have been just a local developement branch that the developer never pushed public... How do I know where in the branch1 the revC belongs?
</OT>

So, here is how I think it might work:

A: hey, do you know I work on syncing between monotone and cvs?
B: really? I'd like to check it out.
A: you can pull it from our server at venge.net, the branch is called "monotone.cvssync".
B: ok, will do.

Now B goes and does "monotone pull venge.net monotone.cvssync". The pull could default to using the "remote" name to identify the branch. We could decide what the best default behavior for the name resolution would be to best match the _ecology_ so that when "pulling" from a server we ask for the branch by the "remote" name. When pushing we could default to "local" name when selecting what to push - the point being that I select what to push using *my* names but it will be stored under the right remote name without any further action on my side (I don't use "sync" so I don't know what would be a good default). The name could be prefixed with something to switch between local and remote name to override the default...

To be extra sure A can say instead

A: you can pull it from our server at venge.net, the branch is called "monotone.cvssync" (the ID is 9982342abd...)

and B can pull by ID...

The next time:

A: hey, there is this great new thing I added to venge.net/monotone.cvssync
B: ok, I'll try...

"monotone pull venge.net monotone.cvssync" downloads the new parts. Now A decides to rename the branch to something different, let's say "monotone.cvspush" [arbitrary name].

A: hey there is a new work available at venge.net/monotone.cvspush

"monotone pull venge.net monotone.cvspush" finds out that it actualy has most of the data because the remote ID belonging to the new name is known. It could output something like "pulling monotone.cvspush to monotone.cvssync" and be done with it. I could either rename the branch localy to match that of the server or even to something completly different (let say "not-interesting.monotone.cvssync").

Where is the problem?

Sorry, that was, err, probably more than you were expecting to have to
wade through in response to your idea :-).  Does this stuff make
sense?  What do you think?

It does, I just think we do not need the mapping (for branches) to be globally consistent which makes it IMHO much easier.
Right, but that's where we disagree :-).
:-) Right, that's the best way to get the discussion going and get some good ideas out.

Zbynek

--
http://zw.matfyz.cz/     http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic





reply via email to

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