Basic Mercurial Workflow
From Second Life Wiki
- Locate authoritative master on http://bitbucket.org/lindenlab
- Fork the master using the bitbucket fork operation
- Clone the fork using the commands shown by bitbucket
- Perform your edits
- Pull to merge changes from other people using your fork, if applicable
- Request a pull from the owner of the authoritative master.
In one big picture
Here, Lefty and Righty are both sharing the same bitbucket repository:
- hg clone, pull and push are essentially database replication operations. They do not actually modify code. They just append to the revision history.
- All repositories have the complete revision graph - which means all the branchy-mergy stuff that happened in the past.
- Multiple heads is the normal state after pulling from an active repository.
- hg merge is the operation that will combine changes.
- hg merge is not symetrical. It will preserve the "branch you are on" and terminate the "branch you are merging from", as illustrated by the colors in the revision graphs below. Keep this in mind when maintaining named branches.