title: Mercurial: get latest head revision of branch from remote repo
body: <p>I am looking for simple solution for my deployment bash script.</p>
  
  <p>Each run of this script should add tag to the latest revision on <code>production</code> branch, but of the remote repo.</p>
  
  <p>People running the script might have own <code>production</code> changesets, not pushed to the remote repo, and my server is getting code directly from the remote repo with read-only access. This is why I need to get latest changeset from remote repo, but commit tag locally.</p>
  
  <p>I tried tricks like:</p>
  
  <p><code>hg identify -i $(hg paths default)</code></p>
  
  <ul>
  <li>it's great, but gives only tip rev, cannot define branch</li>
  </ul>
  
  <p><code>hg heads production</code></p>
  
  <ul>
  <li>it's great again, returns latest branch head, but only from local repo..</li>
  </ul>
  
  <p>Hope there is something else that I'm missing and there is a way to get that remote branch head revision id..</p>