monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: renaming branches (was Re: Ideas and questions.


From: Jeremy Fincher
Subject: Re: [Monotone-devel] Re: renaming branches (was Re: Ideas and questions.)
Date: Thu, 17 Feb 2005 11:57:32 -0500

On Feb 17, 2005, at 3:50 AM, graydon hoare wrote:

Jeremy Fincher wrote:

I'm not sure if this is necessary, or if it's a good thing to enforce. People *will* pick duplicate branch names. There is no doubt in my mind that many people will have branches named "bugs" or "main" or "dev", etc. No matter how many times we say, "Pick a globally unique name!" people still will not do so. I think, rather than have the database *enforce* unique human-readable names, we should instead have the user disambiguate such collisions himself.

I think you misunderstand what I mean. I mean that in one user's database, they would have a 1:1 mapping between an "alias" and a branch ID. other users, in other databases, could have different (or colliding) aliases. but the user would not have either of these cases:

  - 2 aliases mapping to the same branch ID in a database
  - 1 alias mapping to two different branch IDs in a database

I'm not misunderstanding you, I don't think. I'm suggesting that this latter case, where one human-readable name maps to two different branch IDs in the database, is a perfectly fine state of affairs, and is indeed preferable to enforcing that 1:1 mapping you suggest.

I want to prohibit those, at a UI level, because it makes the UI significantly more surprising and hard to predict.

I don't think it does. When Monotone encounters a clash, it asks the user which branch he wants, and caches that decision in a human-readable configuration file in MT or ~/.monotone or similar.

I think this actually makes the UI *less* surprising and hard to predict, in fact, because then the user doesn't need to know if the original author of the branch changes its name from "dev" to "supybot-dev" or similar -- if he's already disambiguated it, he can continue using whatever alias he provided for it.

Of course, this wouldn't be very user-friendly if the user had to disambiguate branch names *every* time, so I suggest that we cache the user's decision in some way that's easily editable/readable by the user: either a dotfile in his home directory or a file in MT/. We could keep a mapping of human-readable names to random ids, and use that first when we're given a branch name by the user.

that mapping, which you just described, is the 1:1 mapping I'm talking about. I think it would be fine to keep it in your database, even send it to another user as "advice" when you're syncing.

The problem I see there is that I'm also making this suggestion so that someone who works solely on a single project doesn't have to type "net.venge.monotone" very often -- he can simply alias it to "mt" if he wants (this is one reason why I think the data should do in a ~/.dotfile, if possible). Certainly these kinds of merely convenient aliases shouldn't be propagated?

I think there's a slightly bigger rift between our two concepts, but I think I'll start a new thread for that...more on that later! :)

Jeremy





reply via email to

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