콘솔에서 보려니 까매서.. 눈에 안보이는 까막눈...



$ svn diff | view -

빔: 표준입력에서 읽는 중...


$ whereis view

view: /usr/bin/view /usr/share/man/man1/view.1.gz

$ ll /usr/bin/view

lrwxrwxrwx 1 root root 22 2014-08-25 16:42 /usr/bin/view -> /etc/alternatives/view*

$ ll /etc/alternatives/view

lrwxrwxrwx 1 root root 18 2014-08-25 16:42 /etc/alternatives/view -> /usr/bin/vim.gnome*


[링크 : http://www.commandlinefu.com/commands/view/2420/colored-svn-diff]

Posted by 구차니

svn add나 import 시에

/etc/subversion/config

~/.subversion/config와 상관없이 ignore 되는 확장자가 발생을 하는데

일단 이런 현상을 겪기 싫다면.. --no-ignore를 기본적으로 사용하는게 좋을듯 하다.



$ svn help import

import: 버전관리 대상이 아닌 파일과 디렉토리를 추가합니다.

사용법: import [PATH] URL


  PATH의 하위 디렉토리를 재귀적으로 URL에 추가합니다.

  PATH가 생략되면 '.' 이 사용됩니다. 필요한 경우,

  저장소 상에 상위 디렉토리가 자동으로 생성됩니다.

  PATH가 디렉토리이면, 그 내용은 URL에 모두 추가 됩니다.

  --force가 지정되면 버전관리 할 수 없는 장치 파일이나

  파이프등은 무시됩니다


옵션:

  -q [--quiet]             : 아무것도 출력하지 않거나, 요약 정보만 출력합니다

  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates

  --depth ARG              : 적용할 단계를 제한합니다. 가능한 인자 ('empty', 'files',

                            'immediates', or 'infinity')

  --auto-props             : 자동 속성기능을 활성화합니다

  --force                  : 강제로 실행합니다

  --no-auto-props          : 자동 속성기능을 비활성화합니다

  -m [--message] ARG       : 커밋 로그 메시지를 지정합니다

  -F [--file] ARG          : arg에서 로그 메시지를 읽습니다

  --force-log              : 로그 메시지의 유효성을 확인하지 않습니다

  --editor-cmd ARG         : arg를 외부 편집기로 사용합니다

  --encoding ARG           : 값을 arg에 해당하는 문자코드로 취급합니다

  --with-revprop ARG       : set revision property ARG in new revision

                             using the name[=value] format

  --no-ignore              : svn:ignore로 지정한 것과 디폴트로 무시하는 파일들을 무시하지 않습니다


글로벌 옵션:

  --username ARG           : arg를 접속에 필요한 사용자 ID로 사용합니다

  --password ARG           : arg를 접속에 필요한 패스워드로 사용합니다

  --no-auth-cache          : 인증 정보를 캐시에 저장하지 않습니다

  --non-interactive        : 대화식 사용자 입력을 기다리지 않습니다

  --trust-server-cert      : accept unknown SSL server certificates without

                             prompting (but only with '--non-interactive')

  --config-dir ARG         : arg로 지정된 디렉토리에서 사용자 구성화일을 읽습니다

  --config-option ARG      : set user configuration option in the format:

                                 FILE:SECTION:OPTION=[VALUE]

                             For example:

                                 servers:global:http-library=serf 


$ svn help add

add: 파일과 디렉토리를 버전관리 대상에 넣습니다. 저장소에

추가하도록 스케쥴링 되며, 다음 커밋할 때, 추가됩니다.

사용법: add PATH...


옵션:

  --targets ARG            : ARG로 주어진 파일 내용을 옵션으로 추가합니다

  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates

  --depth ARG              : 적용할 단계를 제한합니다. 가능한 인자 ('empty', 'files',

                            'immediates', or 'infinity')

  -q [--quiet]             : 아무것도 출력하지 않거나, 요약 정보만 출력합니다

  --force                  : 강제로 실행합니다

  --no-ignore              : svn:ignore로 지정한 것과 디폴트로 무시하는 파일들을 무시하지 않습니다

  --auto-props             : 자동 속성기능을 활성화합니다

  --no-auto-props          : 자동 속성기능을 비활성화합니다

  --parents                : 임시 상위개체 삽입


글로벌 옵션:

  --username ARG           : arg를 접속에 필요한 사용자 ID로 사용합니다

  --password ARG           : arg를 접속에 필요한 패스워드로 사용합니다

  --no-auth-cache          : 인증 정보를 캐시에 저장하지 않습니다

  --non-interactive        : 대화식 사용자 입력을 기다리지 않습니다

  --trust-server-cert      : accept unknown SSL server certificates without

                             prompting (but only with '--non-interactive')

  --config-dir ARG         : arg로 지정된 디렉토리에서 사용자 구성화일을 읽습니다

  --config-option ARG      : set user configuration option in the format:

                                 FILE:SECTION:OPTION=[VALUE]

                             For example:

                                 servers:global:http-library=serf


$ vi /etc/subversion/config

 96 ### Section for configuring miscelleneous Subversion options.

 97 [miscellany]

 98 ### Set global-ignores to a set of whitespace-delimited globs

 99 ### which Subversion will ignore in its 'status' output, and

100 ### while importing or adding files and directories.

101 ### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.

102 # global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

103 #   *.rej *~ #*# .#* .*.swp .DS_Store 


Warning: There is an error in the book: 

The default value of global-ignores was changed in svn 1.5 and 

now includes *.so *.so.[0-9]* files, 

but the one displayed in the book was not updated. 


[링크 : http://svn.haxx.se/users/archive-2009-05/0899.shtml]


[링크 : http://stackoverflow.com/.../svn-propget-svnignore-returns-nothing-but-svn-is-obviously-ignoring-my-files]

[링크 : http://svn.haxx.se/users/archive-2009-02/0821.shtml]

Posted by 구차니

externals에서 내 프로젝트에서 원하는 경로에

외부 저장소를 불러오거나

특정 리비전을 불러와야 할 경우에 대해서 사용하는 추가적인 기능이다


개인 리파지터리 만들어서 해봐야지..


---

2014.12.30 added


Step 1. 원하는 폴더에서 우클릭으로 TortoiseSVN - Properties

Step 2. Properties 창에서 New - Externals


Step 3. svn:externals - New


Step 4. Local path는 절대 경로가 아닌 우클릭한 경로 기준의 상대경로로

           프로젝트를 저장할 폴더명 만 적어 주면된다 -_ㅠ

           URL은 외부 프로젝트의 경로를 적어준다.

           아래의 Revision은 일단.. 항상 최신 버전을 받아와야 한다면 HEAD를 특정 리비전을 위해서는 Revision으로


Step 5. 별다른거 없이.. Added가 나오는데 프로젝트로 전부 추가되는거 봐서는...

           큰 프로젝트를 svn:externals로 추가할경우 상당한 시간이 걸릴 것으로 예상된다.


Step 6. svn:externals에 추가후에 commit을 하던 update 후에 commit을 하던

           뜨는건 modified(property change only) 라고 뜬다. 즉, 내 저장소의 용량에는 영향이 없다는 것?


Step 7. repo. browser로 보면 이렇게 바로가기로 출력된다.


---


[링크 : http://baboc.tistory.com/97]

[링크 : http://itbaby.egloos.com/4295117]

[링크 : http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html]

Posted by 구차니
해당 파일을 남겨야 한다면
1. 파일 이름 변경
2. svn del 파일이름
3. 파일 이름 복구

해당 파일을 남길 필요가 없다면
1. svn del 파일이름

[링크 : https://kldp.org/node/52211]


+ 혹시나 해서 테스트 한 내용 백업파일을 만들어 두길 잘했지 ㅋㅋ
아무튼 svn del을 하면 해당 파일을 삭제하게 되니 주의요망!
$ svn st
?       libliveMedia.a.bak
A       libliveMedia.a

$ ll libliveMedia.a* 
-rw-r--r--  1 minimonk minimonk 1489620 2014-11-17 09:13 libliveMedia.a
-rw-r--r--  1 minimonk minimonk 1489620 2014-11-17 09:14 libliveMedia.a.bak

$ svn del --force libliveMedia.a
D         libliveMedia.a

$ ll libliveMedia.a*
-rw-r--r-- 1 minimonk minimonk 1489620 2014-11-17 09:14 libliveMedia.a.bak

$ svn st
?       libliveMedia.a.bak 

 
Posted by 구차니
export는 대개 서버의 버전에서 관리용 .svn 디렉토리를 빼고 받아오지만
수정중인 워킹 카피에서 깔끔(?)하게 .svn을 지우는 방법으로
해당 워킹 카피를 export 해버리면 된다. 


a-wc는 원본 워킹 카피의 경로(절대 경로 던 상대경로 던)
my-export는 a-wc를 export할 목적지 경로이다.

Export from your working copy (doesn't print every file and directory):

$ svn export a-wc my-export
Export complete.
Export directly from the repository (prints every file and directory):

$ svn export file:///var/svn/repos my-export
A    my-export/test
A    my-export/quiz
Exported revision 15.

[링크: http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.export.html
Posted by 구차니
Ubuntu 10.04 LTS에서 테스트 완료

function svn {
  command svn "$@" | awk '
  BEGIN {
    cpt_c=0;
  }
  {
    if        ($1=="C") {
      cpt_c=cpt_c+1;
      print "\033[31m" $0 "\033[00m";  # Conflicts are displayed in red
    }
    else if   ($1=="A") {
      print "\033[32m" $0 "\033[00m";  # Add in green
    }
    else if   ($1=="?") {
      print "\033[36m" $0 "\033[00m";  # New in cyan
    }
    else if   ($1=="D") {
      print "\033[35m" $0 "\033[00m";  # Delete in magenta
    }
    else                {
      print $0;                        # No color, just print the line
    }
  }
  END {
    print cpt_c, " conflicts are found.";
  }';
} 

[링크 : http://stackoverflow.com/questions/8786400/svn-add-colors-on-command-line-svn-with-awk-in-bash]



\e[00m"

00에 숫자가 들어가면 된다.
30대는 foreground color
40대는 background color 를 지칭하고

1~7은 아래의 색상값을 가지게 된다.


[링크 : http://en.wikipedia.org/wiki/ANSI_escape_code]
[링크 : http://sunyzero.egloos.com/viewer/4282610]
+
svn ci 할때 뭔가 에러가 발생하는 기분이니 확인필요 
Posted by 구차니
전보다는 mingw가 빨라졌는지 속도가 꽤 나온다. (3~5MiB)
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Cloning into 'linux'...
remote: Counting objects: 3656409, done.
remote: Compressing objects: 100% (555211/555211), done.
Receiving objects:  16% (592016/3656409), 302.04 MiB | 3.47 MiB/s 

mingw git port
[링크 : http://git-scm.com/downloads]
[링크 : http://msysgit.github.io/]

이녀석.. 설치과정이 너~~~무 길다 -_-











메뉴는 Init / Gui / Bash 세가지


Gui를 누르면 먼가 좀.. TortoriseHg 같은 UI가 나온다 -_-a


궁금해서 추가해보지만 안된다 ㅠㅠ


걍 bash에서 명령어 복/붙 해서 해보니 한참 걸리네..


git history 하니 이렇게 이쁘게 쫜!


git gui



tortoise git
[링크 : https://code.google.com/p/tortoisegit/]

만만한 거부기!








확실히.. git 보단 조금은 단간한 설치 과정.
그리고 익숙한 context menu!


git clone을 통해서 svn checkout 하듯 받아 오면 되는데
Load Putty Key는 체크는 되어있지만 별 상관은 없는듯 하다.


위에서 mingw로 linux에 받고 있어서 일단 linux2로 받는데 속도는 mingw를 쓰는지 거의 동일하게 나온다.


show log


와.. 냅뒀더니 미친듯이 메모리 / 하드를 긁어대네.. 메모리 4기가인데 이거 머하는 짓이야!!! ㅠㅠ


2010/03/18 - [프로그램 사용/CVS / SVN / GIT / Mercurial] - GIT는 리눅스에서 받으시는걸 추천합니다. 

후덜덜. 리눅스 커널을 받았더니 총 1.37 기가


소스 자체는 530 메가 밖(에 일리가 있나!!!!)에 안된다.

 
Posted by 구차니

아무래도 익숙한.. tortoise 가 있으니 일단 사용
설치후 우클릭 하면 컨텍스트 메뉴에 Hg workbench와 TortoiseHg가 추가되는데
TortoiseHg의  Create Repository Here 하면 저장소 겸 워킹 카피가 생성된다.
SVN처럼 저장소와 워킹 카피가 별도로 존재하는 개념이 아닌 하나의 통합된 개념이다. 


Hg command 에서 보이듯,
해당 폴더를 초기화 시켜준다.

생성완료!


생성 이후에는 .hg 라는 폴더와 .hgignore 가 생성된다.
그리고 소스를 현재 위치에 넣어주면 사용은 끝! 


우클릭에서 Hg workbench를 누르면


SVN의 history 와 repository browser를 합쳐 놓은 듯한 워크벤치
중앙의 ### filter text ### 아래의 아이콘을 누르면
현재 리비전에 변경이 생긴 목록과 전체 소스 트리를 번갈아 볼 수 있다.
설명서를 안본것도 문제지만 이렇게 눈에 안들어 오다니 -_- 


Posted by 구차니
실험적으로 mercurial을 홀로 써보는 중..
도움이 되는 문서 링크이다.


[링크 : http://hginit.com/00.html] 번역본은 아래에
  [링크 : http://blog.daum.net/leejaku/301] Subversion 사용자를 위한 Mecurial 안내서
  [링크 : http://blog.daum.net/leejaku/302] Mercurial 기초 다지기
  [링크 : http://blog.daum.net/leejaku/303] 팀을 위한 Mercurial 셋팅
  [링크 : http://blog.daum.net/leejaku/306] Mercurial 실수를 되돌리는 법
  [링크 : http://blog.daum.net/leejaku/307] Mercurial의 병합
  [링크 : http://blog.daum.net/leejaku/308] Mercurial의 레포지토리 구조

[링크 : http://helloworld.naver.com/helloworld/1011] git vs hg
[링크 : http://tortoisehg.readthedocs.org/en/latest/

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

git for windows  (0) 2014.06.27
tortoiseHG / mercurial 사용하기  (0) 2014.06.25
svn to git migration 가이드  (0) 2014.06.02
google code - svn, mercurial  (0) 2014.05.24
mercurial SCM  (0) 2014.05.02
Posted by 구차니
svn에 비해서 로컬에서 할 수 있는 작업이 더 늘기에 쓰기 어렵다는데
clone을 통한 다른 revision에 대한 history가 빠르다거나, 인터넷이 끊어져도 커밋할 수 있다거나 등의
장점이 있어서 한번 써보려고 조사중!

[링크 : https://groups.google.com/forum/#!topic/xper/kt1znmz82JA]
[링크 : http://blog.doortts.com/141]

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

tortoiseHG / mercurial 사용하기  (0) 2014.06.25
tortoiseHG , git vs mercurial 관련 문서  (0) 2014.06.08
google code - svn, mercurial  (0) 2014.05.24
mercurial SCM  (0) 2014.05.02
git 간편 설명서  (0) 2014.03.06
Posted by 구차니