Xcode 4.2, How to use Subversion 1.7 in Xcode 4.2

I have used MacPorts (http://www.macports.org/).
Currently, MacPorts Suversion is a version 1.7.x.
% LANG=C svn --version
svn, version 1.7.2 (r1207936)

With version 1.7 or later, there are compatibility issues with earlier versions 1.6.
Then this is one way to solve the problem.

1. Backup
I changed the original file by appending the suffix “-1.6”.
% mv /Developer/usr/bin/svn /Developer/usr/bin/svn-1.6

2. Symbolic link
from /opt/local/bin
% ln -s /opt/local/bin/svn /Developer/usr/bin/svn
% ls /Developer/usr/bin/svn
/Developer/usr/bin/svn@ -> /opt/local/bin/svn


Simple Script :

#!/usr/bin/env zsh
cd /Developer/usr/bin

# Backup
sudo mv svn svn-1.6
sudo mv svndumpfilter svndumpfilter-1.6
sudo mv svnserve svnserve-1.6
sudo mv svnversion svnversion-1.6
sudo mv svnadmin svnadmin-1.6
sudo mv svnlook svnlook-1.6
sudo mv svnsync svnsync-1.6

# Symbolic link
sudo ln -svf /opt/local/bin/svn
sudo ln -svf /opt/local/bin/svndumpfilter
sudo ln -svf /opt/local/bin/svnrdump
sudo ln -svf /opt/local/bin/svnsync
sudo ln -svf /opt/local/bin/svnadmin
sudo ln -svf /opt/local/bin/svnlook
sudo ln -svf /opt/local/bin/svnserve
sudo ln -svf /opt/local/bin/svnversion

Check the results :

% ls /Developer/usr/bin/svn*

svnX(OSX), merge 툴로 kdiff3 사용하기.

맥(OS X 10.6)에서 Subversion을 사용하면서
맥용 Merge 툴을 찾게 되었다.


잘 만들어진 Merge 툴 중 kdiff3가 나는 쓰기 편하다.
3way-merge 도 맘에 들고…

kdiff3 : http://kdiff3.sourceforge.net/


많은 소스를 버전 관리 하기 위해서는 터미널 코멘드로는
좀 어렵게 느껴지는 부분이 있다.

한꺼번에 비교를 하거나, 자동적으로 해줬으면 하는 부분 등등.

어쨌든 GUI용 Subversion 클라이언트로
내가 선택한 것은 svnX 이다.

svnX : http://code.google.com/p/svnx

svnX에서 kdiff3 를 호출해서 diff 또는 merge를 할 때 버그가 있다.
svnX 1.3.1버전은 뜨기는 하나 파일을 못 불러오는 버그가 있고,
svnX 버전관리 2011년 11월 30일 버전은 아예 kdiff3가 뜨지를 않는다.

이에 프로젝트 싸이트에 버그레포팅을 했고,
오늘 아침(12월 1일) 답변을 받았다.

해결방법 1)

“svnX – help의 3.11 Diff” 에 설명이 되있다.

3.11. Diff

In a working copy window, click the Diff icon to compare the selected items with their pristine copies (BASE revisions).
Click while pressing the shift key to compare the selected items with their previous (PREV) revisions.
Clicking while pressing the alt key displays a sheet that allows you to compare any two revisions of a single item.
In the general preferences, you can choose between:
FileMerge (requires Xcode installation or, at least, /usr/bin/opendiff & FileMerge.app)
TextWrangler (requires /usr/bin/twdiff)
BBEdit (requires /usr/bin/bbdiff)
Araxis Merge (requires /usr/local/bin/araxissvndiff)
DiffMerge (requires /usr/local/bin/diffmerge.sh)
Changes (requires /usr/bin/chdiff)
Guiffy (requires /usr/local/bin/guiffy)
KDiff3 (requires a symbolic link in ~/bin to the app’s binary:
execute `cd ~/bin; ln -s/Contents/MacOS/kdiff3`).

※ 관련 내가 이전에 쓴글 : svnX for Mac OS X 에서 KDiff3 사용하기.

해결방법 2)

이건 버그레포팅에서 내가 제시했던 것.

주의할 것은,
답변으로 OS X 10.5 (이하?) 버전 에서는 “--args” 옵션이 안된다고 한다.


– “kdiff3” ) ~/bin/kdiff3 “$file1” “$file2” &> /dev/null ;;
+ “kdiff3” ) open -a kdiff3 --args “$file1” “$file2” &> /dev/null ;;


다음은 버그레포팅 내용이다.


Reported by dh.j…@gmail.com, Today (14 hours ago)
What steps will reproduce the problem?
What is the expected output? What do you see instead?

>> kdiff3 is not open problem.

What version of the product are you using? On what operating system?

>> OS : Mac( OS X 10.6.x )
>> svnX Version : subversion repository version & 1.3.1

Please provide any additional information below.

>> look below a patch.
>> and please apply them. 🙂

@@ -65,7 +67,7 @@
“changes” ) /usr/bin/chdiff “$file1” “$file2” ;;
“guiffy” ) DIFF=’/usr/local/bin/guiffy’; if [ $isWorkingCopy ]
then “$DIFF” -m “$file1” “$file2” “$file2”; else “$DIFF” “$file1” “$file2”; fi ;;
– “kdiff3” ) ~/bin/kdiff3 “$file1” “$file2” &> /dev/null ;;
+ “kdiff3” ) open -a kdiff3 --args “$file1” “$file2” &> /dev/null ;;
“filemerge” | * ) DIFF=’/usr/bin/opendiff’; if [ ! -x “$DIFF” ]; then DIFF=”/Developer$DIFF”
if [ ! -x “$DIFF” ]; then DIFF=’opendiff’; fi; fi
if [ $isWorkingCopy ]; then “$DIFF” “$file1” “$file2” -merge “$file2” &> /dev/null

Comment 1 by project member chr…@lavabit.com, Today (8 hours ago)
Please open svnX’s Help window & read section “3.11. Diff”.

The `open` command does not accept `--args` on OSX 10.5, so your patch won’t work there.

Delete comment Comment 2 by dh.j…@gmail.com, Today (20 minutes ago)
Ok. thanks to rapidly reply.

– 끝 –