Reputation: 4680
I can't resolve this conflict to .hgtags
kd:friend-sup/ $ cat .hgtags
<<<<<<< MINE
42569bf07912cd317b9305082d980cb64b318042 106.00
42569bf07912cd317b9305082d980cb64b318042 106.01
45846a087b03e656fcf1f986d39c095fbae2ed9e 106.02
45846a087b03e656fcf1f986d39c095fbae2ed9e 106.03
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.04
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.05
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.06
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.07
||||||| ANCESTOR
=======
ea8e577c2cfc6538da32c16ba4248d27768223bd raw-qf-merge--main-trunk
>>>>>>> OTHER
I tried editing the file in various ways, removing the markers, to no avail. Ideally I want the tags from MINE and OTHER, so just remove the markers.
kd:friend-sup/ $ vi .hgtags
the failure:
kd:friend-sup/ $ hg resolve .hgtags
merging .hgtags
merging .hgtags failed!
kd:friend-sup/ $ cat .hgtags
<<<<<<< MINE
42569bf07912cd317b9305082d980cb64b318042 106.00
42569bf07912cd317b9305082d980cb64b318042 106.01
45846a087b03e656fcf1f986d39c095fbae2ed9e 106.02
45846a087b03e656fcf1f986d39c095fbae2ed9e 106.03
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.04
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.05
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.06
c45c61fdfe20fa088a4418fef55ba93930d6dbe0 106.07
||||||| ANCESTOR
=======
ea8e577c2cfc6538da32c16ba4248d27768223bd raw-qf-merge--main-trunk
>>>>>>> OTHER
Upvotes: 3
Views: 1017
Reputation: 229854
You want to mark the merge conflict in the file as solved, so you should use the -m
option:
hg resolve -m .hgtags
Without that, hg resolve
retries to merge the file, overwriting your manual changes.
The relevant part of hg resolve --help
:
The resolve command can be used in the following ways:
- "
hg resolve [--tool TOOL] FILE...
": attempt to re-merge the specified files, discarding any previous merge attempts. Re-merging is not performed for files already marked as resolved. Use "--all/-a" to selects all unresolved files. "--tool
" can be used to specify the merge tool used for the given files. It overrides the HGMERGE environment variable and your configuration files.- "
hg resolve -m [FILE]
": mark a file as having been resolved (e.g. after having manually fixed-up the files). The default is to mark all unresolved files.
Upvotes: 7