Basic Mercurial Workflow

From Second Life Wiki
Jump to: navigation, search
  1. Locate authoritative master on
  2. Fork the master using the bitbucket fork operation
  3. Clone the fork using the commands shown by bitbucket
  4. Perform your edits
  5. Pull to merge changes from other people using your fork, if applicable
  6. Push
  7. 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.