Open Bug 1325327 Opened 8 years ago Updated 1 year ago

mozilla-unified should have a @ bookmark

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: glandium, Unassigned)

Details

Attachments

(1 file)

Per https://www.mercurial-scm.org/wiki/Bookmarks: "If you have a bookmark named @ when cloning a remote repository, "hg clone" will check it out by default." We should have such a bookmark, pointing to central or inbound.
I'm kind of "meh" about this. It does provide a UX win for vanilla Mercurial when users `hg clone` manually. But we now offer to clone via the one-line bootstrap and that handles updating to "central" automatically. We also strongly recommend people use the "firefoxtree" extension when working with mozilla-unified because it converts the bookmarks to read-only labels of the same name. This prevents people from accidentally advancing the bookmarks and causing divergence. The reason the bookmarks exist at all is to make the repo usable with vanilla Mercurial (otherwise there would be multiple heads on the same named branch). So given that, I suppose it wouldn't be too bad to create the @ bookmark and have "firefoxtree" ignore it. Then again, this is just for a workflow optimization for a one-time thing that people may not run into if they are using the one-line bootstrap. It feels like avoidable complexity for marginal gain.
Not everybody uses mach bootstrap, and not everybody uses mercurial. For one, if I can turn the git-cinnabar workflow into "git clone hg::https://hg.mozilla.org/mozilla-unified and you're done", that would definitely be a win. And I'm experimenting with defaulting to only expose bookmarks when there are bookmarks. And the most reliable thing I can do then is hoping one of the bookmarks corresponds to the tip of the default branch, but in mozilla-unified's case, it means, depending on the time of day, you can end up with aurora, beta, central or inbound as the HEAD.
Flags: needinfo?(gps)
Cleaning out my backlog...
Assignee: nobody → gps
Status: NEW → ASSIGNED
Flags: needinfo?(gps)
Comment on attachment 8869272 [details] ansible/hg-ssh: store a @ bookmark for mozilla-central (bug 1325327); https://reviewboard.mozilla.org/r/140832/#review144530 ::: hgext/firefoxtree/__init__.py:372 (Diff revision 1) > if bmstore.active == tag: > repo.ui.status('(deactivating bookmark %s)\n' % tag) > bookmarks.deactivate(repo) > > + # The @ tag is redundant with central. Don't replicate it locally. > + if tag == '@': Per the first hunk in this file, firefoxtrees is not reporting the '@' tag on the server side, why care on the client end? ::: hgext/firefoxtree/__init__.py:422 (Diff revision 1) > + # @ and central are the same. So ignore @. > + if k != '@' and not resolve_trees_to_uris([k])[0][1]} Mmmmm actually, shouldn't the @ bookmark still be pulled?
Attachment #8869272 - Flags: review?(mh+mozilla)
Comment on attachment 8869272 [details] ansible/hg-ssh: store a @ bookmark for mozilla-central (bug 1325327); https://reviewboard.mozilla.org/r/140832/#review144530 > Mmmmm actually, shouldn't the @ bookmark still be pulled? @ will be pulled by vanilla clients, which is desirable. The issue is for clients with firefoxtree. The whole point of converting the bookmarks on the server to not-bookmarks is so users don't activate them and move them locally. (Because vanilla Mercurial doesn't have remote refs.) So it seems kinda weird to have tracking labels/not-bookmarks for everything except @. But it is also sub-optimal to not have @. There's no obvious right solution here.
Assignee: gps → nobody
Status: ASSIGNED → NEW

Connor can we reconsider this? It's confusing for someone cloning unified to end up with a random branch checked out, e.g. if they end up on a busted autoland revision.

Flags: needinfo?(sheehan)

I agree this would be useful to have.

We should ignore adding @ as a firefoxtree special tag, and either keep it as a regular bookmark for firefoxtree clients or just ignore it altogether. Then we can have @ point to central or autoland via the unification daemon config file.

Flags: needinfo?(sheehan)

(In reply to Julien Cristau [:jcristau] from comment #7)

Connor can we reconsider this? It's confusing for someone cloning unified to end up with a random branch checked out, e.g. if they end up on a busted autoland revision.

Or a commit on some other branch, like beta, release or esr.

This still, to this day, tricks people.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: