Mercurial `hg clone` but ignoring all subrepos?

后端 未结 4 1649
無奈伤痛
無奈伤痛 2021-02-04 00:37

Is there a way to clone a repo that comes with subrepos, but without having Mercurial pull all the subrepos?

It appears that while hg clone -U can be used t

4条回答
  •  别跟我提以往
    2021-02-04 01:14

    This should do what you want:

    REM Take a new clone, but do not update working directory
    hg clone --noupdate %REPO_PATH% %DESTINATION%
    
    REM Update working directory but exclude the certain subprojects
    hg revert --all --rev %BRANCH% --exclude %SUBREPO_PATH_1% --exclude %SUBREPO_PATH_2%
    

提交回复
热议问题