When merging conflicting changes using hg merge
, Mercurial inserts a set of markers into the files to be merged in my working copy like this:
<<<<<<< local version = 0.2 ======= version = 0.1 >>>>>>> other
Then I manually edit all files marked as U from a list produced by hg resolve --all -l
and then I tell mercurial I have resolved them by hg resolve -m file1 file2 file3 ...
In many situations I would like however accept either my-only or their-only changes on some conflicting files. I am thinking to create two simple sed/awk/whatever scripts named accept-theirs.sh
and accept-my.sh
or is there any "proper" way to do it?
right click file with conflicts without left-click / opening file in editor pane. click "Accept all Incoming" / "Accept all Current"
Use
hg resolve -t internal:other --all
to accept theirs
and
hg resolve -t internal:local --all
to accept yours
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With