title: Mercurial commit on new repository
body: <p>I have a Bamboo plan that runs a script to build a project.  The script updates the AssemblyInfo.cs files in the solution to the next build number, then commits the change and does a fetch to merge any changes and avoid getting multiple heads.</p>
  
  <pre><code>hg commit -m "$(Major).$(Minor).$(Build).$(Revision)"
  hg fetch
  </code></pre>
  
  <p>The output from Bamboo ends up being:</p>
  
  <pre><code>02-Jul-2012 07:50:11 CommitChanges:  
  02-Jul-2012 07:50:11 Commiting version number changes for d:\Builds\TDFGE-DRD-JOB1  
  02-Jul-2012 07:50:11 hg commit -m "1.0.0.6"  
  02-Jul-2012 07:50:12 created new head  
  02-Jul-2012 07:50:12 hg fetch  
  02-Jul-2012 07:50:12 abort: multiple heads in this branch (use "hg heads ." and "hg merge" to merge) 
  02-Jul-2012 07:50:12 d:\Builds\TDFGE-DRD-JOB1\Build.proj(96,3): error MSB3073: The command "hg fetch" exited with code 255. 
  02-Jul-2012 07:50:12 Done Building Project "d:\Builds\TDFGE-DRD-JOB1\Build.proj" (UpdateVersionAndBuild target(s)) -- FAILED. 
  02-Jul-2012 07:50:12
  02-Jul-2012 07:50:12 Build FAILED. 
  </code></pre>
  
  <p>The docs for Mercurial says that Fetch should get the latest code and merge any changes.</p>
  
  <p>This seems like a very simple task, change some files, check them in, continue.  So what am I missing here?  Do I need to do a merge or something?  PS.  I did try adding another merge/commit after the original commit (did not seem correct, but it completed), but then the files pushed back to the main repository still had the old version number, i.e. they were unchanged.  Seems like the merge command took the main repository as the primary parent.</p>