What does hg copy do?

前端 未结 2 951
别那么骄傲
别那么骄傲 2020-12-17 15:15

We recently did a hg copy of a directory in our repository. We thought it does something like cp -a and hg add and maybe flag somehow

2条回答
  •  醉酒成梦
    2020-12-17 15:32

    How do I unflag the file as being a copy of another file?

    If you revert a hg copy, the copied-to file remains in your working directory afterwards, untracked. You just have to add it normally. The copied-from file isn't affected at all.

    % hg copy file new-file
    % hg status -C
    A new-file
    __file
    % hg revert new-file
    % hg add new-file
    % hg status -C
    A new-file
    

    Reference: Mercurial: The definitive guide

提交回复
热议问题