merge vs. "update -m" and working with a remote repository

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Sat May 13 12:14:18 CDT 2006


Dear All,

I'm a newby to hg and I have two questions that affect mainly how I
work with a remote repository.

1. After going through the tutorials, chcking the function help, and
searching on the wiki and email lists, I am still not clear about the
differences between "update -m" and "merge".  In fact, the
TutorialMerge and TutorialConflict do not use "hg merge" but only "hg
update -m". And the text for the help of update and merge is
essentially identical regarding the merging operation. Thus, it seems
to me that "update -m" does indeed do a merge, so what is the point of
"hg merge"?.  What am I missing? When would I need to use "hg merge"
(and NOT "hg update -m")?

2. When  I have a local repository and a public, remote, repository,
and I want to push back my changes to the public remote repository I
think I need to perform four distinct operations, one of them in the
remote machine itself (or in the remote from the local via ssh):

[local]
## get into local possible changes from others to the remote
hg pull ssh://remote_repository
hg update -m

## push my changes to the remote
hg push ssh://remote_repository


## go to remote
ssh remote_repository

[remote]
hg update -m


Instead of doing the update in the remote I could do "ssh
remote_repository 'hg update -m'", but I'd rather ssh and be there, in
case I need to fix merging issues.


Is there a way to simplify this workflow? For instance, with bazaar,
I'd only use two operations if my local branch is "bound" to the
remote (bzr update to get stuff from the remove, and bzr commit to
push and update the changes in the remote), without ever explicitly
having to execute an instruction in the remote machine


Thanks a lot,

R.

-- 
Ramon Diaz-Uriarte
Bioinformatics Unit
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz



More information about the Mercurial mailing list