Mercurial `hg clone` but ignoring all subrepos?

后端 未结 4 1692
無奈伤痛
無奈伤痛 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:24

    Found a hacky way. It still requires all subrepos to be checked out once, but afterwards they can be deleted.

    1. Clone the whole lot, including subrepos. No way around this.
    2. Delete subrepos
    3. hg remove .hgsub

    I tried to convince Mercurial to hg remove .hgsub before the subrepos are cloned, but the best I got is not removing .hgsub: file is untracked.

提交回复
热议问题