title: Mercurial usage to merge multiple heads
body: <p>I'm mercurial newbie and want to learn how to use my <a href="http://montao.googlecode.com">repository</a>. Can you tell me how to merge my friend's work with mine? Thanks</p>
  
  <pre><code>$ hg update tip
  abort: crosses branches (merge branches or use --clean to discard changes)
  
  $ hg heads
  changeset:   265:ac5d3c3a03ac
  tag:         tip
  user:        roberto.cr
  date:        Thu Oct 06 07:32:15 2011 +0000
  summary:     fixing "redirects" links
  
  changeset:   261:6acd1aaef950
  user:        niklasro
  date:        Thu Oct 06 07:53:19 2011 +0000
  summary:     auth backend + js
  
  $ hg update
  abort: crosses branches (merge branches or use --clean to discard changes)
  </code></pre>
  
  <p>Could I use hg resolve?</p>
  
  <pre><code>$ hg resolve
  abort: no files or directories specified; use --all to remerge all file
  
  $ hg glog | more
  @  changeset:   266:2bf5b62720fc
  |  tag:         tip
  |  parent:      261:6acd1aaef950
  |  user:        niklasro
  |  date:        Thu Oct 06 12:48:20 2011 +0000
  |  summary:     added
  |
  | o  changeset:   265:ac5d3c3a03ac
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:32:15 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  | o  changeset:   264:2fd0bf24e90f
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:29:58 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  | o  changeset:   263:29a373aae81e
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:25:05 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  | o  changeset:   262:d75cd4d3e77a
  | |  parent:      260:dfb54b99f84d
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:24:55 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  o |  changeset:   261:6acd1aaef950
  |/   user:        niklasro
  |    date:        Thu Oct 06 07:53:19 2011 +0000
  |    summary:     auth backend + js
  |
  o  changeset:   260:dfb54b99f84d
  |  user:        niklasro
  |  date:        Wed Oct 05 05:34:37 2011 +0000
  |  summary:     FB buggfix example.html
  |
  o  changeset:   259:92fb6b1bc492
  |  user:        niklasro
  |  date:        Thu Sep 29 16:42:33 2011 +0000
  |  summary:     changes
  </code></pre>
  
  <p>The solution was <code>hg revert -a</code> and it looks like a success now</p>
  
  <pre><code>$ hg glog | more
  @    changeset:   267:3b2bb6de33eb
  |\   tag:         tip
  | |  parent:      266:2bf5b62720fc
  | |  parent:      265:ac5d3c3a03ac
  | |  user:        niklasro
  | |  date:        Thu Oct 06 16:06:21 2011 +0000
  | |  summary:     merge
  | |
  | o  changeset:   266:2bf5b62720fc
  | |  parent:      261:6acd1aaef950
  | |  user:        niklasro
  | |  date:        Thu Oct 06 12:48:20 2011 +0000
  | |  summary:     added
  | |
  o |  changeset:   265:ac5d3c3a03ac
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:32:15 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  o |  changeset:   264:2fd0bf24e90f
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:29:58 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  o |  changeset:   263:29a373aae81e
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:25:05 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  o |  changeset:   262:d75cd4d3e77a
  | |  parent:      260:dfb54b99f84d
  | |  user:        roberto.cr
  | |  date:        Thu Oct 06 07:24:55 2011 +0000
  | |  summary:     fixing "redirects" links
  | |
  | o  changeset:   261:6acd1aaef950
  |/   user:        niklasro
  |    date:        Thu Oct 06 07:53:19 2011 +0000
  |    summary:     auth backend + js
  |
  o  changeset:   260:dfb54b99f84d
  |  user:        niklasro
  |  date:        Wed Oct 05 05:34:37 2011 +0000
  |  summary:     FB buggfix example.html
  |
  o  changeset:   259:92fb6b1bc492
  |  user:        niklasro
  |  date:        Thu Sep 29 16:42:33 2011 +0000
  |  summary:     changes
  </code></pre>