Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mark file as resolved using local/remote version

Tags:

mercurial

I pulled one revision and tried to merge but hg couldn't make the merge. I know the right version is the local (or the remote...), so I do this:

hg heads
hg revert file_path --rev right_rev
hg resolve -m file_path
...

Is there an easier way to do this? Yes I know I should open the file, verify, manually resolve, bla bla bla

like image 528
Roberto Avatar asked Jan 24 '11 19:01

Roberto


1 Answers

With newer versions of Mercurial (1.7.0 and later), you can use hg merge --tool internal:local to keep the local version (i.e. the one that's in your working directory), or hg merge --tool internal:other to keep the other version. The --tool option was introduced as a shorthand for --config ui.merge=internal:local, which was how you did it in older versions of Mercurial.

See the merge-tools online help or use hg help merge-tools at the command-line for more information.

like image 98
Niall C. Avatar answered Oct 26 '22 23:10

Niall C.