전체 페이지뷰

2010년 7월 28일 수요일

[펌]SVN에러!!___Failed to add 'XXX' : object of the same name already exists

1.

This error message typically occurs when you try to update your working copy.
이 메시지는 대체로 작동중인 복사물을 갱신하려할때 발생한다.

It is thrown because Subversion never deletes or overwrites existing local data.
하위 버전이 기존의 로컬 데이터를 전혀 지우거나 겹쳐쓰지 못하면 그 메세지가 던저진다.

There may be three reasons why you get this error:
당신이 이러한 에러를 얻는 3가지 이유가 있을지도 모른다.

You have a local unversioned file with the same name as a file which has been added by somebody else recently.
당신은  누군가에 의하여 최근에 추가된 파일처럼 같은 이름의  local unversioned file 을 가지고 있다.

In this case the solution is to move your local file somewhere else (or rename it), then update.
이러한 경우에 해결책은 당신의 로칼파일을 그밖에 어딘가로 옮기고 (아니면 이름을 바꾸거나) 그런다음 갱신하라.

Afterwards you can decide whether the two files need to be combined in some way, or if the choice of name is purely coincidental you can give your file a different name.
그런후에 당신은 두 파일이 어떻게 해서든 결합될 필요가 있는지 ,아니면 그러한 이름의 선택이 적절하다면 당신이 사용하는 파일에 다른 이름을 넣을수 있는지 결정할수 있다.

 

2.

A file has been renamed in the repository, but it differs only in case, like Install.txt to install.txt, and you have local changes.
파일이 저장소에서 이름이 바뀌었지만 단지 Install.txt 에서 install.txt 처럼 대소문자만 다르며 로컬 상태에서 변경한다.

When you update, you end up in a situation (1), where the modified local file appears as unversioned.
갱신할때, 1번과 같은 상황이 되고, 그 상황에서 변경된 로컬 파일은 버전화되지 않은것처럼 나타난다.

Move it somewhere else, update, then sort out the mess. 
그 파일을 그외 다른곳으로 옮기고 갱신한 다음 해결하라.

 

 

 

3.
There are actually 2 different files in the repository whose names differ only in case.
실제로 단지 대소문자형태가 다른 2개의 파일이 저장소에 존재한다.

This cannot work on a Windows checkout, because the Windows file system is not case-sensitive.
윈도우 파일 시스템이 대문자와 소문자를 구별하지 못하기때문에 이것은 윈도우 체크아웃에서 작동하지 못한다.

It is likely that one of the files got added by mistake, so you need to find out which one, make sure there are no changes committed to the wrong file, then delete it.
파일중에 하나가 실수로 추가되었을지도 모른다, 그러므로 그것이 어떤건지 찾아서 잘못된 파일에 아무런 수정도 하지 않았음을 확인하고 그것을 지운다.

 

 


There are several ways to solve the problem and to prevent it from happening again.
이러한 문제를 해결하고 재발을 방지하기위한 여러가지 방법이 있다.

Take a look at these instructions.
다음 지시를 보자.

 

 


Uppercase/lowercase file name conflicts on Windows
대소문자 파일명은 윈도우상에서 충돌한다.


There is a server hook script available at: http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ that will prevent checkins which result in case conflicts
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts에서 이용가능한 서버훅 스크립트가 있는데 그것은 대소문자의 충돌을 일으키는 체크인을 방지할 것이다.

If you already have two files with a name that differs only in case,
이미 대소문자형이 다른 이름을 지닌 두개의 파일을 가지고 있다면,

you have to decide which one of them you want to keep and delete (or rename) the other one from the repository.
둘 중에 어떤 파일을 유지할 것이고 나머지를 저장소에서 지우던가 이름을 바꾸던가 결정해야한다.


There are (at least) two possible solutions to rename a file without losing its log history.
로그기록을 잃지않고 파일의 이름을 바꿀수 있는 방법이 (적어도)2가지가 있다.

It is important to rename it within subversion.
하위버전안에서 그 파일의 이름을 바꾸는 것은 중요하다.

Just renaming in the explorer will corrupt your working copy!!!
탐색창에서 이름을 바꾸는 것은 작동중인 복사물에 오류를 일으킬 것이다.

 


Solution A) (recommended) 권장

1. Commit the changes in your working copy.
 작동중인 복사물을 수정하라

2. Rename the file from UPPERcase to upperCASE directly in the repository using the repository browser.
 저장소 브라우저를 이용하여 저장소내의 파일을 UPPERcase 에서 upperCASE로 직접적으로 바꿔라.

3. Update your working copy.
 작동중인 복사물을 갱신하라.

 

 


Solution B)

1. Rename from UPPERcase to UPPERcase_ with the rename command in the TortoiseSVN submenu.
 TortoiseSVN의 서브메뉴에 있는 rename명령으로 UPPERcase 에서 UPPERcase_ 로 이름을 바꾼다.

2. Commit the changes.
 수정한다.

3. Rename from UPPERcase_ to upperCASE.
 UPPERcase_ 에서 upperCASE로 이름을 바꾼다.

4. Commit the changes.
 수정한다.