Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git回购作为Hg子回购_Git_Mercurial_Bitbucket_Mercurial Subrepos_Subrepos - Fatal编程技术网

Git回购作为Hg子回购

Git回购作为Hg子回购,git,mercurial,bitbucket,mercurial-subrepos,subrepos,Git,Mercurial,Bitbucket,Mercurial Subrepos,Subrepos,请向我解释一种将git存储库作为子存储库添加到hg存储库的正确方法 我只是想知道 克隆hg存储库及其所有子存储库(git和hg) 不包括从subrepo到父repo的源代码,因为subrepo已经有了自己的(git)repo,并且是在我之外开发的 我试过一些东西,现在我真的迷失了方向。我是否应该创建hg subrepo来持有git subrepo?什么版本将.hgsubstate(hg或git)指向?我应该向hg subrepo提交git代码吗?为什么 现在,我正试图融入其中。此时,在bitbu

请向我解释一种将git存储库作为子存储库添加到hg存储库的正确方法

我只是想知道

  • 克隆hg存储库及其所有子存储库(git和hg)
  • 不包括从subrepo到父repo的源代码,因为subrepo已经有了自己的(git)repo,并且是在我之外开发的
  • 我试过一些东西,现在我真的迷失了方向。我是否应该创建hg subrepo来持有git subrepo?什么版本将
    .hgsubstate
    (hg或git)指向?我应该向hg subrepo提交git代码吗?为什么

    现在,我正试图融入其中。此时,在bitbucket上,这项任务看起来已经完成,但当我克隆父(maTemples)repo时,它会在我的工作目录中创建空的hg subrepo

    我的
    .hgsub

    GWT_multiple_apps = GWT_multiple_apps
    
    [subpaths]
    GWT_multiple_apps = git://git@bitbucket.org:espinosa/z025-gwt-maven-alternative-setup.git
    
    我的
    .hgsubstate

    0000000000000000000000000000000000000000 GWT_multiple_apps
    
    所以,当我在bitbucket上单击修订号时,我得到404错误,因为git repo的修订号000000000000不存在。然后,如果我更改
    .hgsubstate
    如下:

    d35a3fb7e627b5598fb763f480e3f76932cf4232 GWT_multiple_apps
    
    d35a3fb7e627b5598fb763f480e3f76932cf4232 GWT_multiple_apps
    
    所以它直接指向git repo的实际头部,而当我克隆我的repo时,我得到以下消息:

    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 10 changesets with 27 changes to 19 files
    updating to branch default
    cloning subrepo GWT_multiple_apps from https://georgy7@bitbucket.org/cube54/mavemples/git%3A//git%40bitbucket.org%3Aespinosa/z025-gwt-maven-alternative-setup.git
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 10 changesets with 27 changes to 19 files
    abort: unknown revision 'd35a3fb7e627b5598fb763f480e3f76932cf4232'!
    
    此外,我的hg subrepo的hgrc文件包含以下内容:

    [paths]
    default = https://georgy7@bitbucket.org/cube54/mavemples/git%3A//git%40bitbucket.org%3Aespinosa/z025-gwt-maven-alternative-setup.git
    
    若我删除subrepo文件夹中的
    .hg
    文件夹,然后将git repo克隆到subrepo文件夹,则提交对话框中的TortoiseHg告诉我子存储库已删除

    所以我根本不知道我要做什么。

    请重新阅读Subrepository Wiki页面,记住国外回购和操作顺序的
    .hgsub
    格式(可能需要重新创建BB superrepo)

    nested=[git]git://example.com/nested/repo/path.git

  • 如果您想制作git subrepo,请更新您的hg。确保您的hg和git是最新的,并且以正确的方式安装。后面的版本给出了更容易理解的错误消息。当hg只给出“中止:消息”时,您只能使用选项
    --回溯--调试
    例如
    hg push--traceback--debughttps://someurl
  • 在bitbucket上使用
    https
    URL而不是
    git@
    one。您可以从project网页复制粘贴它
  • .hgsubstate
    修订版直接指向subrepos的修订版
  • 如果
    .hgsub
    编写正确,git subrepo文件夹中将不会出现
    .hg
    子文件夹 我的新
    .hgsub

    GWT_multiple_apps = [git]https://bitbucket.org/espinosa/z025-gwt-maven-alternative-setup.git
    
    .hgsubstate