2009-11-29 5 views
18

SVN 서버를 다시 설치했고 경로가 svn : //192.168.1.35/DDL2/trunk/DD _...에서 svn : //192.168.1.35/trunk/DD _...로 변경되었습니다. 나는 working copy에 몇 가지 변경을가했고 서버에서 커밋하기를 원했기 때문에 경로를 변경하여 작업 복사본에 영향을주지 않고을 수정해야합니다.SVN 재배치 또는 전환 하시겠습니까?

TortoiseSVN의 재배치 기능을 사용하려고했지만 "재배치는 URL의 저장소 부분 만 변경할 수 있습니다."라고 말하면 어쩌면 스위치를 사용해야하지만 작업 복사본 개정판에 대해 걱정하고 있습니다.


svn info svn://192.168.1.35/

Path: 192.168.1.35 
URL: svn://192.168.1.35 
Repository Root: svn://192.168.1.35 
Repository UUID: 259834e4-a888-4201-9858-aaacfe621d8e 
Revision: 58 
Node Kind: directory 
Last Changed Author: rize 
Last Changed Rev: 58 
Last Changed Date: 2009-11-02 18:33:09 +0100 (po, 02 11 2009) 

svn info D:\Programy\Eclipse Workspace\LDD_L2DP

Path: D:\Programy\Eclipse Workspace\LDD_L2DP 
URL: svn://192.168.1.35/DDL2/trunk/DD_L2DP 
Repository Root: svn://192.168.1.35 
Repository UUID: 259834e4-a888-4201-9858-aaacfe621d8e 
Revision: 21 
Node Kind: directory 
Schedule: normal 
Last Changed Author: rize 
Last Changed Rev: 17 
Last Changed Date: 2009-10-21 19:22:41 +0200 (st, 21 10 2009) 

올드 구조 :

svn://192.168.1.35/DDL2 
svn://192.168.1.35/DDL2/trunk/DD_L2DP 

새로운 구조는

svn://192.168.1.35/ 
svn://192.168.1.35/trunk/DD_L2DP 

답변

6

편집 - 위의 출력을 바탕으로, 난 당신이 다른 접근 방식을 취할 필요가 있다고 생각합니다. 저장소에 DDL2이라는 폴더가있는 /data/repository이라는 원래 저장소가 생성 된 것 같습니다. 이것은 작업 카피 본의 "Repository Root"값을 보는 것을 볼 수 있습니다.

svn switch을 사용하여 저장소의 루트를 수준 아래로 간단하게 밀어 넣을 수 없습니다. 대신 새 희망 루트를 중심으로 repo를 재구성하려면 svn move을 사용해야합니다. 즉, /data/repository에서 Repo를 계속 제공하지만 DDL2 아래의 모든 파일을 최상위 수준으로 이동합니다.

물론 로컬 편집을 사용하면 파일을 한꺼번에 옮기는 것이 쉽지 않을 수 있습니다. 모든 변경 사항을 커밋 한 다음 단일 커밋으로 이동합니다. 이렇게하기 전에 svnserve 인수를 다시 변경해야합니다.

+0

흠, 내가 뭘 잘못하고 있는지 궁금해. 작업 복사본을 마우스 오른쪽 버튼으로 클릭하고 TortoiseSVN -> 재배치를 선택하면 이전 URL이 표시됩니다.URL 수정 후 OK를 선택하고 메시지가 나타납니다. "작업 사본을 같은 저장소의 다른 경로로 옮기려고하는 것 같습니다. 정말로 재배치 하시겠습니까?", 예 및 ... "이전하십시오. 첫 번째 게시물에서 쓴 것처럼 URL의 저장소 부분 만 변경할 수 있습니다. – RiZe

+0

이전 버전을 마이그레이션하는 대신'svn : // 192.168.1.35 /'에 새로운 (빈) 저장소를 생성 했습니까? 또한 이전 저장소를 업데이트하기 전에'/ DDL2' 또는 URL 루트에 뿌리를두고 있습니까? – jheddings

+0

흠, 방금 저장소를 복사했지만 svnserve 인수를 다음과 같이 변경했다고 생각합니다. svnserve -d --listen-host = 192.168.1.35 -r/data/repository/DDL2 – RiZe

20

This question 답을 가지고있다. Specifically :

svn switch --relocate http://svn.example.com/path/to/repository/path/within/repository http://svnnew.example.com/new/repository/path/within/repository 
1
switch (sw): Update the working copy to a different URL. 
usage: 1. switch URL[@PEGREV] [PATH] 
     2. switch --relocate FROM TO [PATH...] 

    1. Update the working copy to mirror a new URL within the repository. 
    This behavior is similar to 'svn update', and is the way to 
    move a working copy to a branch or tag within the same repository. 
    If specified, PEGREV determines in which revision the target is first 
    looked up. 

    If --force is used, unversioned obstructing paths in the working 
    copy do not automatically cause a failure if the switch attempts to 
    add the same path. If the obstructing path is the same type (file 
    or directory) as the corresponding path in the repository it becomes 
    versioned but its contents are left 'as-is' in the working copy. 
    This means that an obstructing directory's unversioned children may 
    also obstruct and become versioned. For files, any content differences 
    between the obstruction and the repository are treated like a local 
    modification to the working copy. All properties from the repository 
    are applied to the obstructing path. 

    Use the --set-depth option to set a new working copy depth on the 
    targets of this operation. Currently, the depth of a working copy 
    directory can only be increased (telescoped more deeply); you cannot 
    make a directory more shallow. 

    2. Rewrite working copy URL metadata to reflect a syntactic change only. 
    This is used when repository's root URL changes (such as a scheme 
    or hostname change) but your working copy still reflects the same 
    directory within the same repository. 
14

서버를 전환하려는 경우 재배치가 사용됩니다. 예를 들어, 작업 복사본이 더 이상 svn : //192.168.1.35/DDL2/trunk/DD_L2DP를 svn : //192.168.1.127/DDL2/trunk/DD_L2DP에 대한 참조로 참조하지 않으려면 재배치를 사용하십시오.

스위치는 작업 복사본이 참조하는 저장소의 디렉토리를 변경하려는 경우에 사용됩니다. 나는 이것이 당신이 원하는 경우라고 믿습니다. 이 작업은 리포지토리 개정 번호에 영향을 미치지 않으며 작업 복사본의 URL 만 업데이트합니다.

svn move은 대개 svn://192.168.1.35/trunk/DDL2DP이고, svn://192.168.1.35/DD_L2DP/trunk을 만들고 싶지만 저장소에 아직 존재하지 않는 경우 사용됩니다.