开发者

How to mark file as resolved using local/remote version

开发者 https://www.devze.com 2023-02-07 00:04 出处:网络
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:

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 o开发者_StackOverflow中文版pen the file, verify, manually resolve, bla bla bla


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.


If you know before you're going to merge you can use this quick trick:

to auto select local (or remote) like this:

hg --config ui.merge=internal:local merge
0

精彩评论

暂无评论...
验证码 换一张
取 消