2009년 12월 11일 금요일

Tortoise SVN의 명령을 Command 창으로 실행하기

 

windheim at naver ( http://blog.naver.com/windheim )

보통 마우스의 오른쪽 버튼 클릭으로 실행되는 똘똘이(Tortoise) SVN을 프롬프트 창에서 실행이 가능하다.

예를 들어 수 십개의 코드 레포지터리를 한꺼번에 업데이트하는 배치파일을 만든다던가 SVN 서버를 애플리케이션과 함께 응용하고자 할 때 유용하다.

예컨대
"D:\work\TestCode" 디렉토리의 코드들을 update하기 위해서는 아래와 같이 실행하면 된다.

(똘똘이 설치 패스)TortoiseProc.exe /command:update /path:"D:\work\TestCode" /notempfile

이외 오른쪽 버튼 클릭으로 실행되는 모든 오퍼레이션을 아래와 같은 명령어 표를 응용하여 실행할 수 있다.

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html#tsvn-automation-basics

# 자동으로 닫지않는다.
tortoiseproc.exe /closeonend:0
# 에러가 없다면 자동으로 닫는다.
tortoiseproc.exe /closeonend:1
# 충돌이 없다면 자동으로 닫는다.
tortoiseproc.exe /closeonend:2
# 머지할 것이 없다면 자동으로 닫는다.
tortoiseproc.exe /closeonend:3

인용:

TortoiseProc.exe /command:commit /path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"
/logmsg:"test log message" /notempfile /closeonend

인용:

TortoiseProc.exe /command:update /path:"c:\svn_wc\" /notempfile /closeonend

인용:

TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"
/revstart:50 /revend:60 /notempfile /closeonend

about Shows the About-dialog. This is also shown if no command is given.
log Opens the log dialog. The path specifies the file or folder for which the log should be shown. Two additional options can be set:
/revstart:xxx and /revend:xxx.
checkout Opens the checkout dialog. The /path specifies the target directory.
import Opens the import dialog. The path specifies the directory with the data to import.
update Updates the working copy in /path to HEAD. If the option /rev is given then a dialog is shown to ask the user to which revision the update should go.
commit Opens the commit dialog. The path specifies the target directory or the list of files to commit. You can also specify the /logmsg switch to pass a predefined log message to the commit dialog.
add Adds the files in /path to version control.
revert Reverts local modifications of a working copy. The /path tells which items to revert.
cleanup Cleans up interrupted or aborted operations and unlocks the working copy in /path.
resolve Marks a conflicted file specified in /path as resolved. If /noquestion is given, then resolving is done without asking the user first if it really should be done.
repocreate Creates a repository in /path
switch Opens the switch dialog. The path specifies the target directory.
export Exports the working copy in /path to another directory. If the /path points to an unversioned directory, a dialog will ask for an URL to export to the dir in /path.
merge Opens the merge dialog. The path specifies the target directory.
copy Brings up the branch/tag dialog. The /path is the working copy to branch/tag from.
settings Opens the settings dialog.
remove Removes the file(s) in /path from version control.
rename Renames the file in /path. The new name for the file is asked with a dialog.
diff Starts the external diff program specified in the TortoiseSVN settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is ommitted, then the diff is done between the file in /path and its BASE.
conflicteditor Starts the conflicteditor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path.
relocate Opens the relocate dialog. The /path specifies the working copy path to relocate.
help Opens the help file.
repostatus Opens the check-for-modifications dialog. The path specifies the working copy directory.
repobrowser Starts the repository browser dialog, pointing to the URL of the working copy given in /path or /path points directly to an URL. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD.
ignore Adds all targes in /path to the ignore list, i.e. adds the svn:ignored property to those files.
blame Opens the blame dialog for the file specified in /path.
cat Saves a file from an URL or working copy path given in /path to the location given in /savepath:path. The revision is given in /revision:xxx. This can be used to get a file with a specific revision.
createpatch Creates a patch file for the path given in /path.

댓글 없음:

댓글 쓰기