gpt4 book ai didi

mercurial - 如何解决 .hgtags 冲突?

转载 作者:行者123 更新时间:2023-12-02 11:27:23 24 4
gpt4 key购买 nike

我无法解决 .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

我尝试以各种方式编辑文件,删除标记,但无济于事。理想情况下,我想要来自“我的”和“其他”的标签,因此只需删除标记即可。

kd:friend-sup/ $ vi .hgtags

失败:

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

最佳答案

您希望将文件中的 merge 冲突标记为已解决,因此您应该使用 -m 选项:

hg resolve -m .hgtags

否则,hg resolve 会重试 merge 文件,覆盖您的手动更改。

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.

关于mercurial - 如何解决 .hgtags 冲突?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7485526/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com