Special repository, for example prototypes, should be selected for hosting of team branches and all the team repositories should be converted into branches in the selected repository. This change will also require modification to push-to-silver jobs.
More ambitious would be http://wiki.netbeans.org/HgPerDeveloperBranch but mapping current team repos to branches would be relatively simple:
1. Close team repos for pushes and turn off push-to-* jobs. Also turn off pushing to main-golden (can use the Bookmarks extension for this in the future if it is still needed by anyone).
2. Wait for all team changes to propagate to main-silver.
3. Turn off push-* jobs.
4. Pick a name for the single repo, probably "main", and close it for remote pushes. Pull everything from all other main clones into main. Team repos should all have been merged in already so nothing else should appear in the default branch, but this would incorporate branches from the prototypes and releases repos at least.
5. Switch any production builds to run from main rather than main-silver (using the default branch or course), and from releases to main if applicable.
6. Modify push-* and push-to-* job configs to work with branches rather than clones.
7. Create team branches in main.
8. Delete all other clones of main from the server. (Could set up symlinks for compatibility.)
9. Open main for pushes, but with access control: only ffjre (i.e. push-* jobs) permitted to push a new head to default branch. (Pushing new _changesets_ on the default branch would be unusual, but permissible so long as they do not create a new _head_ on default.)
10. Instruct developers to change the .hg/hgrc in a former clone checkout from e.g.
default = https://email@example.com/core-main/
default = https://firstname.lastname@example.org/main/
and then 'hg pull -r core -u' to switch to the new branch and continue work as before.
If they had some commits on the default branch unpushed after the team repo was closed, they can adapt them to the branch:
hg up default # if necessary
hg ci --close-branch -m 'switching to core branch'
hg pull -r core -u
hg merge $id
hg ci -m 'treating a few default commits as part of core branch'
(Due to http://mercurial.selenic.com/bts/issue2982 you cannot specify the branch name in the path configuration if you use hg fetch, but this is probably unnecessary anyway - just keep the working copy checked out to the desired revision. It does mean that pulls will retrieve changesets from other branches even if they are not needed for updating.)
11. Reenable push-* and push-to-* jobs.
(In reply to comment #1)
> hg up default # if necessary
> hg ci --close-branch -m 'switching to core branch'
> id=`hg id`
> hg pull -r core -u
> hg merge $id
> hg ci -m 'treating a few default commits as part of core branch'
More simply (but losing changeset IDs which might have been recorded in BZ) they could use:
hg pull -r core -u
hg --config extensions.rebase= rebase -b default