How to checkout a file from one branch to another in Mercurial?

前端 未结 2 532
忘了有多久
忘了有多久 2021-02-12 11:41

How to checkout a single file from one branch to another in Mercurial?

Basically I want to copy a single file from a branch experimental to another branch

2条回答
  •  孤街浪徒
    2021-02-12 11:59

    You can show any file at any revision with hg cat -r experimental filename. But this kind of behavior looks like a debugging patch, in which case I would consider transplanting (cherry-picking in other DVCS).

    hg revert -r experimental filename could do it, not tested.

提交回复
热议问题