본문 바로가기

Programming!

Subversion Task

Subversion + ANT 사용시 대게 아래와 같이 svn Task를 정의해서 쓰지만,
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="project.classpath" />

저 처럼 org.tmatesoft.svn.cli.SVN를 직접 사용하시는 분도 있을듯.

     [java] status (stat, st): Print the status of working copy files and directories.
     [java] usage: status [PATH...]
     [java]   With no args, print only locally modified items (no network access).
     [java]   With -q, print only summary information about locally modified items.
     [java]   With -u, add working revision and server out-of-date information.
     [java]   With -v, print full revision information on every item.
     [java]   The first six columns in the output are each one character wide:
     [java]     First column: Says if item was added, deleted, or otherwise changed
     [java]       ' ' no modifications
     [java]       'A' Added
     [java]       'C' Conflicted
     [java]       'D' Deleted
     [java]       'I' Ignored
     [java]       'M' Modified
     [java]       'R' Replaced
     [java]       'X' item is unversioned, but is used by an externals definition
     [java]       '?' item is not under version control
     [java]       '!' item is missing (removed by non-svn command) or incomplete
     [java]       '~' versioned item obstructed by some item of a different kind
     [java]     Second column: Modifications of a file's or directory's properties
     [java]       ' ' no modifications
     [java]       'C' Conflicted
     [java]       'M' Modified
     [java]     Third column: Whether the working copy directory is locked
     [java]       ' ' not locked
     [java]       'L' locked
     [java]     Fourth column: Scheduled commit will contain addition-with-history
     [java]       ' ' no history scheduled with commit
     [java]       '+' history scheduled with commit
     [java]     Fifth column: Whether the item is switched relative to its parent
     [java]       ' ' normal
     [java]       'S' switched
     [java]     Sixth column: Repository lock token
     [java]       (without -u)
     [java]       ' ' no lock token
     [java]       'K' lock token present
     [java]       (with -u)
     [java]       ' ' not locked in repository, no lock token
     [java]       'K' locked in repository, lock toKen present
     [java]       'O' locked in repository, lock token in some Other working copy
     [java]       'T' locked in repository, lock token present but sTolen
     [java]       'B' not locked in repository, lock token present but Broken
     [java]   The out-of-date information appears in the eighth column (with -u):
     [java]       '*' a newer revision exists on the server
     [java]       ' ' the working copy is up to date
     [java]   Remaining fields are variable width and delimited by spaces:
     [java]     The working revision (with -u or -v)
     [java]     The last committed revision and last committed author (with -v)
     [java]     The working copy path is always the final field, so it can
     [java]       include spaces.
     [java]   Example output:
     [java]     svn status wc
     [java]      M     wc/bar.c
     [java]     A  +   wc/qax.c
     [java]     svn status -u wc
     [java]      M           965    wc/bar.c
     [java]            *     965    wc/foo.c
     [java]     A  +         965    wc/qax.c
     [java]     Status against revision:   981
     [java]     svn status --show-updates --verbose wc
     [java]      M           965       938 shurik       wc/bar.c
     [java]            *     965       922 semen        wc/foo.c
     [java]     A  +         965       687 alex         wc/qax.c
     [java]                  965       687 alex         wc/zig.c
     [java]     Status against revision:   981
     [java] Valid options:
     [java]   -u [--show-updates]      : display update information
     [java]   -v [--verbose]           : print extra information
     [java]   -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
     [java]   --depth ARG              : limit operation by depth ARG ('empty', 'files',
     [java]                             'immediates', or 'infinity')
     [java]   -q [--quiet]             : print nothing, or only summary information
     [java]   --no-ignore              : disregard default and svn:ignore property ignores
     [java]   --incremental            : give output suitable for concatenation
     [java]   --xml                    : output in XML
     [java]   --ignore-externals       : ignore externals definitions
     [java]   --changelist ARG         : operate only on members of changelist ARG
     [java]                              [aliases: --cl]
     [java] Global options:
     [java]   --username ARG           : specify a username ARG
     [java]   --password ARG           : specify a password ARG
     [java]   --no-auth-cache          : do not cache authentication tokens
     [java]   --non-interactive        : do no interactive prompting
     [java]   --config-dir ARG         : read user configuration files from directory ARG

task를 사용할 경우 보다 좀 원초적이지만 더 많은 기능을 제공해 주는 듯 합니다.

 이런저런 Command 중 org.tmatesoft.svn.cli.SVN 의 status를 사용하면 "svn status PROJECT_DIR" 과 같은 결과를 쉽게 얻을 수 있습니다. 즉, repository와 sync를 걸지 않고 수정/추가/삭제된 파일들의 정보를 얻을 수 있죠. 소스를 파보면 더 많은 정보가..

 이거와 몇개를 이용해서 svn을 이용한 배포툴을 생각하고 있습니다. 대게 svn까지 해서 배포는 war나 ftp 등 기타등등으로 하는데요. 이경우 필드에서는 좀 안맞기도 하죠. 

 이전 회사에서 김풍주님(님으로 쓰니 새롭네..)이 그런형태로 만든것이 있었는데, 전 또 저 나름대로 방식이 필요해서 역시 하고 싶은건 많고 애기는 울고 아내는 일찍와~ 하고..ㅋㅋ