2017-11-02 1 views
0

, 태그 후 커밋 brunches 폴더는 http://svn.server/repo/sub-folder/PROJECT-A에 있습니다. 역사상 어느 순간 전체 프로젝트가 다른 폴더로 옮겨진 다음 복원되었습니다.는 SVN을 잃는 "svn의 MV"우리의이 트렁크와 PROJECT-A를 가정 해 봅시다 <p>SVN</p>에서 자신의 위치를 ​​변경 프로젝트에 문제가 발생하는 자식을 SVN에서 프로젝트의 마이그레이션에 대한 SubGit을 사용하고있는

r10001: svn mv –m “moving to a wrong location” http://svn.server/repo/sub-folder/PROJECT-A http://svn.server/repo/wrong-folder/. 
r10002: svn mv –m “moving project back to sub-folder” http://svn.server/repo/wrong-folder/PROJECT-A http://svn.server/repo/sub-folder/. 

우리가 SubGit를 적용한 후 GIT에서 얻는 커밋 moving project back to sub-folder하고 이후의 모든 커밋합니다. 그러나 이전에 발생한 모든 것은 마이그레이션되지 않습니다. svn log은 커밋의 전체 기록을 보여줍니다.

subgit에는 제공된 SVN URL에서 모든 커밋을 가져 오기 (설치) 할 수있는 옵션이 있습니까? 그것과 함께 작동하는 Currenlty --stop-on-copy

답변

2

SubGit은 항상 지정한 SVN URL과 함께 작동하며 그 이상을 결코 알지 못합니다. 당신이 SVN URL로

http://svn.server/repo/sub-folder/PROJECT-A 

를 지정하고있는 경우이 URL 넘어, 그것은 완전히

http://svn.server/repo/wrong-folder/PROJECT-A 

을 무시하는 이유입니다.

다행히도 상황에 맞는 해결 방법이 있습니다.

[svn] 
    ... 
    url = http://svn.server/repo 
    trunk = sub-folder/PROJECT-A/trunk:refs/heads/master 
    branches = sub-folder/PROJECT-A/branches/*:refs/heads/* 
    tags = sub-folder/PROJECT-A/tags/*:refs/tags/* 
    shelves = sub-folder/PROJECT-A/shelves/*:refs/shelves/* 
    branches = wrong-folder/PROJECT-A/trunk:refs/heads/wrong/master 
    branches = wrong-folder/PROJECT-A/branches/*:refs/heads/wrong/* 
    tags = wrong-folder/PROJECT-A/tags/*:refs/tags/wrong/* 
    branches = wrong-folder/PROJECT-A/shelves/*:refs/shelves/wrong/* 

것 같아요, 당신은 아이디어를 이해 : 다음과 같은 구성을 시도 SVN URL로 저장소 루트를 사용하고 가지 경로에 접두사를 추가합니다.

또는 당신이 "subgit의 구성"의 --layout auto 기능을 사용하려고 수 :

subgit configure --svn-url http://svn.server/repo --layout auto --trunk sub-folder/PROJECT-A/trunk repo.git 

"subgit의 구성"는 SVN의 역사를 검사하고 트렁크가와에서 복사 된 모든 디렉토리를 검색합니다 이러한 변형 및 디렉토리로 간주하십시오. 그런 다음 해당 트렁크/분기/태그/선반 옵션이있는 repo.git/subgit/config 파일을 생성합니다. 이 자동 제안에 100 % 의지하는 것은 좋지 않습니다. 생성 된 옵션을 영감으로 사용할 수 있지만 수동으로 매핑을 작성하는 것이 좋습니다.

+0

나는 이것을 시도 할 것이다. 감사합니다. – Viktor

+0

조언 해 주셔서 감사합니다! 이 구성은 완벽한 결과를주었습니다. – Viktor

관련 문제