This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190537 - Use branches instead of team repositories for parallel integration
Summary: Use branches instead of team repositories for parallel integration
Status: NEW
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks: 194550
  Show dependency tree
 
Reported: 2010-09-22 21:55 UTC by rnovak
Modified: 2011-09-02 11:36 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rnovak 2010-09-22 21:55:34 UTC
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.
Comment 1 Jesse Glick 2011-09-01 16:30:06 UTC
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.

  [paths]
  default = https://jhacker@hg.netbeans.org/core-main/

to e.g.

  [paths]
  default = https://jhacker@hg.netbeans.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'
  id=`hg id`
  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.
Comment 2 Jesse Glick 2011-09-02 11:36:40 UTC
(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