2011-09-30 3 views

답변

5

먼저 복제본은 init + pull + update이고 서브repo 복제는 업데이트 단계의 일부인 이 아니고 끌어 오기 단계입니다. 이 업데이트 단계를 건너 뛰는 것만으로 실패 복제를 피할 수 있다는 것을 의미한다 : "어떻게이 문제 .hgsub/.hgsubstate 파일과 버전으로 업데이트하려면 어떻게해야합니까"

$ hg clone -U <url> 

지금 문제가 감소

을 두 가지 가능성이 여기에있다면 : [부경] 기능을 사용

  • 다시 매핑 subrepos는

  • 수동 업데이트 (HG 도움말 subrepo와 HG 도움말 설정 참조)

A "수동 복구 업데이트 "는 다음과 같이 수행 할 수 있습니다.

$ hg revert -a -r default -X problematic-file 
[adding a bunch of files] 
$ hg debugrebuildstate -r default 

이제 수동으로 하위 리포지토리를 수정할 수 있습니다 .hgsub 및 커밋. 푸시하기 전에 복제본을 사용하여 수정 사항을 테스트해야합니다. http://markmail.org/thread/ktxd2rsm7avkexzr

4
$ hg help subrepos 
... 

    Remapping Subrepositories Sources 
    --------------------------------- 

    A subrepository source location may change during a project life, 
    invalidating references stored in the parent repository history. To fix 
    this, rewriting rules can be defined in parent repository "hgrc" file or 
    in Mercurial configuration. See the "[subpaths]" section in hgrc(5) for 
    more details. 

$ man hgrc 
... 

    subpaths 
     Defines subrepositories source locations rewriting rules of the form: 

     <pattern> = <replacement> 

     Where pattern is a regular expression matching the source and replacement is the replacement string used to 
     rewrite it. Groups can be matched in pattern and referenced in replacements. For instance: 

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

     rewrites http://server/foo-hg/ into http://hg.server/foo/. 

     All patterns are applied in definition order. 

... 

그래서, 당신은 [subpaths] 섹션에 .hgrc에서 그것을 할 수 있습니다.

+0

나는이 작업을 수행하는 방법을 알고하지 않았다, 그래서 대답은 내가 그것을 발견 정확하게하는 방법을 보여줍니다

또한, 주제에이 메일 링리스트 스레드를 참조하십시오. 'hg help'와'man'은 훌륭한 유틸리티입니다. –