ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • SVN Repository 서버 아이피 변경
    Programming 2009. 9. 9. 15:48

    살다보니 SVN 저장소 서버의 IP가 변경되는 날이 있지 않는가~
    내게도 그런날이 왔다.

    svn관련 지난 블로깅 URL http://www.willow.pe.kr/363

    1. 로컬 PC (windos XP)


    톨토이스(TortoiseSVN)를 쓰는 나는 해당 디렉토리를 선택~
    오른쪽 마우스 클릭~
    Relocate 옵션을 클릭하면 변경창이 뜬다.

    그곳에서 해당 아이피를 변경해주면
    파일이 많으면 시간이 좀 걸리지만 변경된다 ^^

    tip
    hosts 파일에
    xxx.xxx.xxx.xxx svn-svr    를 추가하여 준다.
    아이피가 바뀌는경우는 이곳에서 변경하면 땡~!

    2. Web 서버 (centOS)

    방법은 다양하다.
    ▶ 다시 checkout 받거나~
    ex) svn checkout svn://IP/webService/aaa

    ▶ 숨은디렉토리에서 아이피를 변경하거나~
    ex) find ./ -name "Root" -exec perl -pi -e 's/111.111.111.111/222.222.222.222/g' {} \;

    ▶ svn 명령어로 바꾸거나~ (이게 나의 선택)

    1. svn switch

    [shell]# svn switch
    switch (sw): Update the working copy to a different URL.
    usage: 1. switch URL [PATH]
          2. switch --relocate FROM TO [PATH...]

      1. Update the working copy to mirror a new URL within the repository.
        This behaviour is similar to 'svn update', and is the way to
        move a working copy to a branch or tag within the same repository.

      2. Rewrite working copy URL metadata to reflect a syntactic change only.
        This is used when repository's root URL changes (such as a schema
        or hostname change) but your working copy still reflects the same
        directory within the same repository.

    Valid options:
      -r [--revision] arg      : ARG (some commands also take ARG1:ARG2 range)
                                A revision argument can be one of:
                                   NUMBER       revision number
                                   "{" DATE "}" revision at start of the date
                                   "HEAD"       latest in repository
                                   "BASE"       base rev of item's working copy
                                   "COMMITTED"  last commit at or before BASE
                                   "PREV"       revision just before COMMITTED
      -N [--non-recursive]     : operate on single directory only
      -q [--quiet]             : print as little as possible
      --diff3-cmd arg          : use ARG as merge command
      --relocate               : relocate via URL-rewriting
      --username arg           : specify a username ARG
      --password arg           : specify a password ARG
      --no-auth-cache          : do not cache authentication tokens
      --non-interactive        : do no interactive prompting
      --config-dir arg         : read user configuration files from directory ARG


    2. 해당 디렉토리로 이동후~ 실수 방지겸 svn info 확인해주시고~

    [shell]# svn info
    Path: .
    URL: svn://xxx.xxx.xxx.xxx/webService/aaa
    Repository UUID: 630b9b21-8825-bf4a-b294-99b1bfe6cfee
    Revision: 17024
    Node Kind: directory
    Schedule: normal
    Last Changed Author: xxx
    Last Changed Rev: 17024
    Last Changed Date: 2009-04-15 12:25:16 +0900 (수, 15  4월 2009)


    3. 명령어 실행~
    tip swith 를 실행하면 현재 접속 계정의 비번을 묻는다.
    당황하지 말고 그냥 엔터치면 다시 계정부터 묻는다. 그때 자신의 계정과 비번을 입력~

    [shell]# svn switch --relocate svn://xxx.xxx.xx.x/webService/변경전 svn://xxx.xx.xx.x/webService/변경후
    Authentication realm: <svn://xxx.xx.xx.x:xx> Alias
    Password for 'root':
    Authentication realm: <svn://xxx.xx.xx.x:xx> Alias
    Username: willow
    Password for 'willow':


    4. svn update 가 잘되는지 확인한다~

    [shell]# cd aaa; svn update
    U  template/aa.html
    U  template/bb.html
    Updated to revision 19884.


    url   http://junho85.tistory.com/10
    http://cityelf.egloos.com/1580583


    'Programming' 카테고리의 다른 글

    육감 (sixthsense)  (0) 2010.01.04
    좋아하는 자는 즐기는 자를 따를 수 없다.  (0) 2009.08.12
    폰트에 대하여  (1) 2009.02.27

    댓글

Designed by Tistory.