7

私たちのプロジェクトにはいくつかのリモート サブリポジトリがあり、それらのアドレスは最近 から に移動しhttp://host/pathましたhttp://other_host/path。たとえば、Mercurial がサブレポが にあると考えている先月のリビジョンに戻るにはどうすればよいhttp://host/pathでしょうか?

$ hg -v up -d 1/20/2012
Found revision 1091 from Fri Jan 20 10:22:29 2012 -0600
resolving manifests
abort: error: No connection could be made because the target machine actively refused it


$ hg --debug up -d 1/20/2012
Found revision 1091 from Fri Jan 20 10:22:29 2012 -0600
resolving manifests

<snip...>

subrepo merge 0f0f2b807811+ 0908d5249a6f 0f0f2b807811
  subrepo external/our_remote_repo: both sides changed, merge with https://old_host/external/our_remote_repo:c66cf52ce1f240193190cec392d889618c09f22b:hg
using https://old_host/external/our_remote_repo
sending capabilities command
using auth.old_host.* for authentication
abort: error: No connection could be made because the target machine actively refused it
4

2 に答える 2

8

ドキュメントによると、hgrcで[subpaths]を使用して、そのようなURLを再マップできます。

これは、サブリポジトリのソースロケーションの書き換えルールを次の形式で定義することに要約されます。

<pattern> = <replacement>

ここで、patternはソースに一致する正規表現であり、replacementはそれを書き換えるために使用される置換文字列です。グループはパターンで一致させ、置換で参照することができます。例えば:

http://server/(.*)-hg/ = http://hg.server/\1/

書き直し

http://server/foo-hg/ into http://hg.server/foo/.
于 2012-02-20T23:15:47.507 に答える
-5

あなたはそれをすることはできません。Mercurialは、このリビジョン(subrepoのURL、subrepoのリビジョン)で正確に保持されていた状態で戻ります。

于 2012-02-20T17:27:55.120 に答える