4

I'm new to Mercurial.

  1. I initialized a Mercurial project on Machine A, committed my changes and uploaded them to a remote repository.

  2. Then I cloned that repository on Machine B, committed some additional changes and uploaded them to the same remote repository.

In both cases, I uploaded the changes with the same command:

hg push https://username:password@domain/user/repository/

Now I'm back on Machine A and I'm not sure how to update my local repository with the last changes I uploaded to the remote repository from Machine B.

The commands hg clone or hg pull look like they might work but I'm not sure.

Would appreciate any guidance. Thanks.

eggdrop
  • 3,356
  • 5
  • 29
  • 32
  • 1
    See "Sharing Changes" in the Mercurial book: http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html#id347917 – Martin Geisler Oct 18 '09 at 12:51

2 Answers2

8

hg pull will transfer any remote changesets not present in your local repo. Afterwards, you'll need to either hg update or hg merge depending on the presence of local changes.

tonfa
  • 24,151
  • 2
  • 35
  • 41
4

Use hg pull; pull transfers only changesets which are missing in the existing destination repository.
hg clone creates local copy of a remote repository.

See also this so question.

Community
  • 1
  • 1
rcs
  • 67,191
  • 22
  • 172
  • 153