SVN은 바이너리 타입으로 데이터를 저장한다.
그리고 데이터는 zlib를 사용하여 압축하기 때문에 텍스트의 경우 상당한 공간 절약 효과가 있다 (CVS 대비)

테스트 삼아 CVS -> SVN 변환하면서 어느정도 용량의 차이가 있을까 궁금해서 캡쳐를 해보았다.


보시다시피, SVN은 CVS를 변환한 것임에도 불구하고 거의 1/4 크기 정도 밖에 되지 않는다. (25% 크기로 압축됨)

[참고 : http://stackoverflow.com/questions/458182/does-svn-compress-the-binary-content]


'프로그램 사용 > Version Control' 카테고리의 다른 글

svn tagging/branching  (0) 2009.08.20
SVN repository 구조  (0) 2009.05.11
cvs2svn 사용방법  (0) 2009.05.10
SVN의 단점  (0) 2009.05.08
svn 저장소의 위치  (0) 2009.05.08
Posted by 구차니
A Few Examples

To create a new Subversion repository by converting an existing CVS repository, run the script like this:
   $ cvs2svn --svnrepos NEW_SVNREPOS CVSREPOS

To create a new Subversion repository containing only trunk commits, and omitting all branches and tags from the CVS repository, do
   $ cvs2svn --trunk-only --svnrepos NEW_SVNREPOS CVSREPOS

To create a Subversion dumpfile (suitable for 'svnadmin load') from a CVS repository, run it like this:
   $ cvs2svn --dumpfile DUMPFILE CVSREPOS

To use an options file to define all of the conversion parameters, specify --options:
   $ cvs2svn --options OPTIONSFILE

As it works, cvs2svn will create many temporary files in a temporary directory called "cvs2svn-tmp" (or the directory specified with --tmpdir). This is normal. If the entire conversion is successful, however, those tempfiles will be automatically removed. If the conversion is not successful, or if you specify the '--skip-cleanup' option, cvs2svn will leave the temporary files behind for possible debugging.

[출처  : http://cvs2svn.tigris.org/cvs2svn.html]

cvs2svn은 cvs 리파지터리를 svn으로 변환해주는 툴이다.
변환과정중에 하나라도 잘못된 ,v 파일(cvs의 history 파일)이 있으면 중지되고,
한글을 사용했을 경우, encoding 문제로 인해서 pass 2에서 문제가 발생한다.

ERROR: There were warnings converting author names and/or log messages
to unicode (see messages above).  Please restart this pass
with one or more '--encoding' parameters or with '--fallback-encoding'.

$ man cvs2svn
       --encoding=encoding
              Use  encoding  as  the  encoding for filenames, log messages, and
              author names in the CVS repos.  This option may be specified mul-
              tiple times, in which case the encodings are tried in order until
              one        succeeds.         Default:         ascii.          See
              http://docs.python.org/lib/standard-encodings.html  for a list of
              other standard encodings.

       --fallback-encoding=encoding
              If none of the encodings specified  with  --encoding  succeed  in
              decoding  an  author name or log message, then fall back to using
              encoding in lossy 'replace' mode.  Use of this option  may  cause
              information  to be lost, but at least it allows the conversion to
              run to completion.  This option only affects the encoding of  log
              messages  and  author  names;  there  is no fallback encoding for
              filenames.  (By using an --options file, it is possible to  spec-
              ify a fallback encoding for filenames.)  Default: disabled.

그래서 위에 나온 링크에서 encoding 항목을 뒤져 보았다.
 Codec  Aliases  Languages
 cp949  949, ms949, uhc  Korean
 euc_kr  euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001  Korean
 iso2022_jp_2  iso2022jp-2, iso-2022-jp-2  Japanese, Korean, Simplified Chinese, Western Europe, Greek
 iso2022_kr  csiso2022kr, iso2022kr, iso-2022-kr  Korean
 johab  cp1361, ms1361  Korean

[출처 : http://docs.python.org/library/codecs.html#standard-encodings]



acroedit에서 열어 보니 ANSI-UNIX-949 라고 나온다.
windows에서 TortoiseCVS로 사용했다면 cp949로 encoding을 설정하면 이상없이 변환된다.

아무튼 실행은 아래의 명령어로 한다.
$ cvs2svn --svnrepos svn/ --encoding=cp949 /home/cvs/

변환 pass가 상당히 많다. 오래 걸리는 것은 pass 1 과 pass 16이다.


변환된 결과


cvs에 여러개의 소스들이 있는데, 전부 trunk 아래로 들어가게 되엇다.
그리고 tag과 branch 역시 분리 되어있다.


로그메시지는, 너무 많은 관계로 100개씩 만 보이게 되어 있고,
하나의 리파지터리에 들어 오는 바람에, 연관이 없는 다른 프로젝트의 revision과 함께 섞였다.
이런 이유로, 다른 소스는 다른 리파지터리에 저장을 해줘야 할 듯 하다.
Posted by 구차니
$HOME/.subversion/config 파일의 [tunnels] 부분 내용이다.

### Section for configuring tunnel agents.
[tunnels]
### Configure svn protocol tunnel schemes here.  By default, only
### the 'ssh' scheme is defined.  You can define other schemes to
### be used with 'svn+scheme://hostname/path' URLs.  A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined.  The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces.  The command will be invoked as:
###   <command> <hostname> svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as <user>@<hostname>.)  Here we
### redefine the built-in 'ssh' scheme to avoid an unfortunate
### interaction with the "ControlMaster auto" feature (for
### details, see Debian Bug #413102):
ssh = $SVN_SSH ssh -o ControlMaster=no
### If you wanted to define a new 'rsh' scheme, to be used with
### 'svn+rsh:' URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator.  A single backslash will be treated as an
### escape for the following character.

http://www.pyrasis.com/main/Subversion-HOWTO#s-4.4 의 문서에 의하면 저기에 있는

ssh = $SVN_SSH ssh -o ControlMaster=no

ssh = ssh -l userid

로 하면 된다고 하는데.. 해도 안된다 ㅠ.ㅠ
svn client의 차이때문일려나... (예제는 콘솔에서이고 나는 TortoiseSVN에서)


그리고 TortoiseSVN의 설명에서는
.ssh/ 에 몇가지 RSA 키를 생성하고 접속시에
svn+ssh://svnuser@SvnConnection/repos
이렇게 하라는데.. 여전히 안된다...

Posted by 구차니
프로그램 사용/winscp2009. 5. 10. 00:36
윈도우에서는 winscp를 이용하면 간단하고 쉽게 SSH/FTP에 접속이 가능하다.
putty와 별개로 작동해서 약간은 불편하지만, 그래도 freeware라는 장점이 있다


winSCP는 포터블 버전으로 받으면 편하게 사용할 수 있고,
putty 에서 session으로 저장하면 winSCP에서도 사용할 수 있다.

[winscp : http://winscp.net/]




아무튼 이런 GUI 프로그램을 찾다 보니.. gFTP라는 것이 발견되었다.
winSCP와 거의 유사한 모양으로 상당히 편리하게 할 수 있다. 단, SFTP로 사용하기 위해서는
비밀번호 옆의 프로토콜을 SSH2로 맞추어 주어야 한다.

[gFTP : http://gftp.seul.org/]


아무튼. 혹시나 해서 명령어를 쳐봤더니 sftp라는 것이 존재한다.
포트 설정법은 -oPort=22 이런식으로 해주는것 외에는 ftp 클라이언트와 거의 동일하게 사용하면 된다.


Posted by 구차니
프로그램 사용2009. 5. 8. 16:58
테스트를 할 일이 있어서, 짧은 MP3 파일이 필요 했는데
mp3 자르는 프로그램을 찾다 보니 이 프로그램이 가장 유명한 것 같아서 사용하게 되었다.


글씨로만 이루어진 타이틀도 참 이쁘다는 생각이든다

파일을 열게 되면 나오는 알림 문구, 나오는 파형은 실제 파형이 아니라고 경고를 하고 있다.

mp3는 가청주파수 외에는 전부 자르고,
약한 소리는 강한 소리에 파뭍혀 들리지 않는 특성을 이용하므로
결과론적으로 파형중 가장 강한 소리의 파형만 보이게 된다.

파일을 열면 이렇게 깔끔하게 보인다. 중앙의 확대 축소로 배율을 조정이 가능하다

자르는데 필요한 것은 클릭 / 드래그
(선택된 영역은 밝은 형광 파란색이다)

그리고 메뉴에서 선택구간 저장

[공식 : http://mpesch3.de1.cc/mp3dc.html]
Posted by 구차니
출근길에 SVN 설명서를 읽어 보니..

svn에 접속하는 방법으로는

file://
svn://
svn+ssh://
http://

정도가 있다고 한다.

근데.. http:// 를 이용하는 방법 외에는
svn 사용 로그가 남는 방법이 없다고 한다.

cvs에 비해서는 사용로그가 남지 않는 다는 건 관리자 측면에서는 아쉽지만,
사용자 측면에서는 아무런 아쉬움이 없으니 음..



[출처  : http://svnbook.red-bean.com/nightly/en/svn-book.pdf]
Posted by 구차니
예를 들어
/home/svn 이 svn의 저장소를 놓을 위치이고
그 아래에 각각의 프로젝트가 들어 간다면

저장소의 위치는 /home/svn이다.

svnserve -d로 구동할때 의 경로는 /home/svn이 되고
svn으로 checkout을 할때의 경로는 각 프로젝트를 넣어 준다.

예를 들어

/home/svn/proj1
/home/svn/proj2
가 있다면

svn://svnserver.ip.addr/proj1
이런식으로 접속하면 프로젝트에 대해서 보인다.

음.. 그런데 굳이 각각의 저장소로 여러개의 저장소에 구분을 해야 하는 이유가 있을려나..
그냥 repos 이런식으로 하나의 저장소만을 만들고
그 아래에 디렉토리/폴더로 구분하면 될텐데 말이다...

아무튼 각 저장소별 ./conf 디렉토리에는
passwd / auth / svnserve.conf가 존재하며

svnserve.conf의 주석 몇개와
passwd에 사용자 계정을 추가하면
svn:// 식으로 접속하여 사용이 가능하다.
svn+ssh://은 아직.. OTL


svnserve.conf
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256

passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
userid = password

위의 경우는 사용자명 userid, 암호가 password인 경우이며,
svn에 수정/삭제 시 아래와 같이 인증을 요구하게 된다.



[참고 : http://www.pyrasis.com/main/Subversion-HOWTO#s-4.3]
Posted by 구차니
우분투에 ssh를 설치후 접속하면 아래와 같이 무진장 긴 메시지가 나온다

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

/etc/motd.tail 파일을 수정하면 우분투 ssh 접속시 나오는 메시지를 바꿀수 있다고 한다.
하지만 데비안 계열은 이 내용을 수정하는 것은 불법이라고 하는데.. 조금 짜증나도 냅둬야 하나?

[링크: http://www.coveredjin.com/tag/ssh%20%EB%A9%94%EC%84%B8%EC%A7%80]

2010.02.04 추가
/etc/issue 파일에 일반적으로 로그인시 출력하는 메시지가 들어있다.
Posted by 구차니
프로그램 사용/nfs2009. 4. 29. 18:05
Root-NFS: Server returned error -13 while mounting /home/...

이녀석은... 뒤의 경로를 잘못 입력했을 때 발생한다.
Posted by 구차니
솔찍히 gprof로 나오는 결과를 보는 방법도 모르겠고
간단한 프로그램으로는 결과도 제대로 나오지 않아서 실제로 사용해본적이 없다.
아무튼.. 간단하게 gui로 보여주는게 있길래 일단 링크

Download

Don't remember when, 2007, or maybe 2008.
xgprof-0.9.tar.gz
More improvements in the GUI, provided by Enrico Segre (dig the web to get his contact, he might still be at the Weizmann Institute).



[링크 : http://sed.free.fr/xgprof/]


Posted by 구차니