簡體   English   中英

使用bitbucket repo git submodule add失敗了

[英]git submodule add failed with bitbucket repo

我正在嘗試為我的項目添加一個repo作為子模塊,因為它將取決於它。 該項目托管在bitbucket上,當我嘗試使用它添加它: git submodule add https://bitbucket.org/blueluna/transmissionrpc ,我得到以下內容:

Cloning into 'transmissionrpc'...
fatal: repository 'https://bitbucket.org/blueluna/transmissionrpc/' not found
Clone of 'https://bitbucket.org/blueluna/transmissionrpc' into submodule path 'transmissionrpc' failed

我在終端點擊鏈接本身,這導致了一個有效的鏈接。 我不知道如何在我的github repo中添加它。 它還將通過SSH和HTTPS中的git clone提供問題。 注意,復制用於克隆此repo的原始命令如下: hg clone ssh://hg@bitbucket.org/blueluna/transmissionrpc ,據我所知使用mercurial。

因為它是一個mercurial repo,所以錯誤是預期的:git不能將它克隆為(git)子模塊repo。

您需要一個git repo才能將您的repo添加為(git)子模塊。
這將涉及轉換,如“ 有沒有辦法將Mercurial存儲庫用作Git子模塊? ”中所述。

OP單元格報告轉換部分失敗, repo.branchtags() Mercurial 2.9中的repo.branchtags()不可用 ,但可以使用以下補丁hg-fast-export.py

270a271,287

> def legacy_branchtip(repo, heads):
>     '''return the tipmost branch head in heads'''
>     tip = heads[-1]
>     for h in reversed(heads):
>         if not repo[h].closesbranch():
>             tip = h
>             break
>     return tip
> 
> def legacy_branchtags(repo):
>     '''return a dict where branch names map to the tipmost head of
>     the branch, open heads come before closed'''
>     bt = {}
>     for bn, heads in repo.branchmap().iteritems():
>         bt[bn] = legacy_branchtip(repo, heads)
>     return bt
> 
272c289
<   branches=repo.branchtags()
---
>   branches=legacy_branchtags(repo)
> 

大段引用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM