canmove, Confirmed users
2,056
edits
(make it clearer that two of the steps involve editing client/client.mk) |
(add info about merging changes to a stable branch) |
||
| Line 112: | Line 112: | ||
Finally, publicize the branch so developers know about it, since Mercurial will warn them about the new head when they next pull from the central repository. | Finally, publicize the branch so developers know about it, since Mercurial will warn them about the new head when they next pull from the central repository. | ||
== Merging Changes to a Stable Branch == | |||
After creating a stable branch, you may find there are changes on the trunk that you would like to take on the branch, either because they are fixes for regressions in a release candidate or because they are candidates for a minor update to a stable release (i.e. a 1.3.1 update to 1.3). | |||
To merge those changes to the branch, clone the repository: | |||
hg clone http://hg.mozilla.org/labs/personas/ personas | |||
Update your working copy to the stable branch (in this example, the client-1.3 branch): | |||
cd personas/ | |||
hg update -r client-1.3 | |||
Export the change from the trunk (in this example, revision 3c92b1b9f9b2), import it into your working copy, and commit it to the branch in one fell swoop: | |||
hg export 3c92b1b9f9b2 | hg import - | |||
This works because even though your working copy is updated to the branch, it has access to the trunk's revisions. And when you import patches that have been exported from a Mercurial repository, Mercurial preserves the user, date, and summary from the original checkin when it automatically commits them. | |||
Note: in [http://hgbook.red-bean.com/read/managing-releases-and-branchy-development.html#id385475 Don't repeat yourself: merging across branches], the Mercurial documentation suggests a technique for merging across branches that assumes you are merging across branches in separate repositories (whereas Personas uses named branches within a single repository), that you initially commit the fix to the stable branch (whereas Mozilla developers almost always commit the fix to the trunk first), and that you are merging all changes (whereas Personas developers usually merge only selected changes), so it's probably not appropriate for Personas. | |||