Svn tree conflict 해결 방법 c

Etc....

2012. 6. 4. 10:09

SVN 폴더를 통채로 날렸더니 갑자기 트리충돌로 업데이트가 제대로 되지 않았다.

구글링을 통해 방법을 찾아보았으나 잘되지 않아 결국 폴더하나 만들어서 다시 체크아웃했다 ㅠ

나중에라도 필요할지 모르니 일단 블로그에 끄적여놔야겠다.

첫번째 

충돌발생한 디렉토리를 다른곳으로 이동

이동한 디렉토리안에 svn폴더 삭제

해당 프로젝트 cleanup 

해당 프로젝트 update

이동한 디렉토리 다시 복사

이후 디렉토리에서 commit 메뉴 수행.

두번째

1. svn resolved 폴더 또는 파일명(충돌을 발생하는)

2. svn update

3. svn commit --message "commit" ("" 안쪽은 아무 문장이나 넣어주어도 됨)

참고 : //svnbook.red-bean.com/en/1.0/ch03s05.html#svn-ch-3-sect-4.4

SVN 사용시 Commit 중 remains in conflict 발생

Svn?

Svn은 형상관리 툴로써 프로그램 source 파일을 버전별로 관리 할 수 있다.

Commit 중 remains in conflict 발생

Svn Commit 하는 중에 remain in conflict가 발생 하는 경우 가있습니다.

서버에 있는 파일과 local에 가지고 있는 파일이 서로 내용이 틀려 충돌이 생기는 경우 인데 이럴경우 해결 책을 알아 보겠습니다.

 svn remove --force [filename]

 svn resolve --accept=working [filename]

 svn commit

사용 예제는 아래와 같습니다.

svn remove --force test.c

svn resolve --accept=working test.c

svn commit

TortoiseSVN can help with several kinds of tree conflicts using Edit Conflict window.

The problem is that in case of "... upon merge" conflict types TortoiseSVN can't guess which files need to be merged.

For example, (case: local missing, incoming delete upon update)

  • Developer A working on trunk modifies file Foo.c and commits it to the repository.
  • I working on branch move file Foo.c to Bar.c and commit it to the repository.

A merge of developer A's changes to my branch working copy results in a tree conflict:

  • Bar.c is already in my working copy with status 'normal'
  • Foo.c is marked as missing with a tree conflict

In most cases I need to merge Developer A’s changes to Foo.c into the renamed Bar.c.

But how can I do it?

File Foo.c with Developer A’s changes does not present in my branch WC.

The TortoiseSVN Help says “Note that if you copy the missing file from the repository and then mark as resolved, your copy will be removed again. You have to resolve the conflict first.”

So, should I need to chechout trunk to have access to Foo.c file for merge? Is there more simple approach to solve this problem?

This problem (how TortoiseSVN can solve tree conflicts) is very critical for me and our developers.

Could you help me?

asked Nov 8, 2010 at 10:03

I like zellus's solution. You could also merge the move of the file into the branch, and then perform the merge back to trunk.

What I do when merging big branches, is merge trunk into the branch first, resolve all the conflicts (including tree conflicts), then merge the result back to trunk. This keeps trunk more stable for longer during the merge period, too.

answered Nov 8, 2010 at 21:19

Mike MillerMike Miller

2,1211 gold badge18 silver badges22 bronze badges

You may use a "Two URL Merge" in order to merge changes from Foo.c on 'trunk' into your branched and renamed Bar.c.

cd branch/B svn merge //www/svn/svnroot/branches/B/Bar.c //www/svn/trunk/Foo.c Bar.c

Whereas branch/B is a working copy.

To finally remove the conflict developer A and B should agree on the same filename. Using different files for the same code might not be desirable.

EDIT: From looking at how 'other' vcs approach this issue, I would like to quote from the paragraph 'Renaming files and merging changes':

If I modify a file, and you rename it to a new name, and then we merge our respective changes, my modifications to the file under its original name will be propagated into the file under its new name. (This is something you might expect to “simply work,” but not all revision control systems actually do this.)

Maybe a reason to give Mercurial a try.

answered Nov 8, 2010 at 20:48

zelluszellus

9,6075 gold badges38 silver badges56 bronze badges

Toplist

최신 우편물

태그