Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Mercurial 中,hg 合并后,如何恢复标记为“U”的文件并将模式匹配到特定版本?
执行“hg 合并”后,我发现一类文件与模式匹配并标记为“U”被错误地合并,并希望将它们恢复到最后一个版本。怎么做?
这会将未解析的文本文件恢复到合并的第一个父级。用于p2()第二个父母:
p2()
hg revert "set:*.txt and unresolved()" --rev p1()
然后,您可能需要它来清除未解析的标志:
hg resolve --mark *.txt
编辑
根据您的评论,我在 Windows 上成功测试了此命令:
hg revert "set:'re:[0-9]foobar.*\.txt' and unresolved()" -r "p1()"