Mercurial - see list of files that need to be manually merged?

前端 未结 4 2256
遥遥无期
遥遥无期 2021-02-18 13:21

Is there a Mercurial command you can use after an hg pull to see a list of all files that will be need to be manually merged (ie: that have conflicts) when doing an

4条回答
  •  鱼传尺愫
    2021-02-18 14:01

    Unless I'm misreading it myself, the answers above don't seem to address the question that I think is being asked: I have two branches in my repository that I'd like to merge, and I want to know what conflicts will come up (e.g., before stepping through the conflict resolutions one-by-one.)

    To do this, I would merge with the :merge3 tool (which tries to merge automatically, but leaves conflicts unresolved) and then use hg resolve --list — or just look at the output of merge command — to see the conflicts.

    hg merge  --tool :merge3
    hg resolve -l
    

    If you didn't actually want to merge in the end (if you just want to see what would conflict) you can run hg update -C afterwards to undo the merge.

    If you do want to finish the merge, you can run hg resolve for each file, or just hg resolve --all to step through all that remain with conflicts, before you hg commit the merge changeset.

提交回复
热议问题