tags:

views:

100

answers:

2

Hi,

I'm using mercurial. The main clone is called "farm". I made a clone of it called "myfarm" which I've been developing locally. Now I want to push the changes from my clone to the real clone hosted at googlecode.

So in the context of my own clone "myfarm", I run [hg incoming farm]. This seems to list all the changes that have been made to "farm" since I made my clone of it. Lists a bunch of stuff like:

changeset:   545:edfe4dadf
parent:      549:ea8e55929bcF
parent:      592:dfdf05dbcfA3
user:        Some user
date:        Some date
summary:     Some comments

ok so then I ran [hg pull farm]. I'm left with the following at the command prompt:

pulling from https://blah.googlecode.com/hg
searching for changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 3 changes to 2 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)

ok, so is everything merged for me already, or do I need to run [hg merge farm] now? How will I know if there are conflicts? If so, I'm also not sure if I have to run:

hg merge farm
hg merge

I mean, I want to merge the results of the pull, but am not sure which of the above two is appropriate.

I'm used to using svn, so in this case, I would have just done:

svn update (notified of merge changes)
svn ci

Thanks

+4  A: 

In the case you've described, you would run hg merge.

Joel has recently published a good tutorial on version control with Subversion at http://hginit.com. I would suggest having a read through this if you're still not quite up to speed with the concepts. I would recommend reading through the tutorial sequentially (rather than skipping to the "Merge" page) because the examples he uses build upon one another and will be easier to follow if you've read the previous sections.

Greg Hewgill
A: 

Hg has an svnbook too.
Chapter 3 clearly explains your problem.

hg merge is indeed what I would do.

jan