2012-02-20 4 views
6

우리 프로젝트의 리모트 서브 레포가 몇 개 있는데, 주소가 최근에 http://host/path에서 http://other_host/path으로 옮겨졌습니다. 지난 달에 어떻게 수정판으로 돌아갈 수 있습니까? Mercurial은 서브 프리 토가 http://host/path에있을 수 있다고 생각합니까?옮긴 서브 레포로 오래된 Mercurial 버전으로 업데이트

$ 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 

답변

6

documentation에 따르면 당신은 remap such urls에 hgrc에 [윤곽선] 사용할 수 있습니다.

이 패턴은 상기 소스와 일치하는 정규 표현이고 교체를 재기록하는 데 사용되는 대체 문자열이다

<pattern> = <replacement> 

형태 규칙 재기록 subrepositories 소스 위치를 정의 귀결. 그룹을 패턴으로 일치시키고 대체에서 참조 할 수 있습니다. 예를 들어 :

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

http://server/foo-hg/ into http://hg.server/foo/. 
+0

끝내 주셔서 감사합니다. – moswald

-5

당신은 할 수 없습니다. 그것은이 개정 (subrepo의 URL, subrepo의 개정)에 정확히 한 상태에서 의욕 반환,

+2

@michel이 Sznajder의 솔루션 그냥 잘 작동합니다 재 작성. –