Created
June 8, 2009 06:27
-
-
Save masakih/125667 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 作業コピー内でRepository Rootを表示 | |
| alias svnroot="LC_ALL=C svn info | awk '/Root:/{print \$3}'" | |
| # 作業コピー内でRepositoryの内容をRepository Rootを起点に表示。svnroot必須。 | |
| function svnls { | |
| svn ls `svnroot`/$1 | |
| } | |
| # 作業コピー内でコピーを作成する。svnroot必須。 | |
| function svncp { | |
| if [ $# -eq 0 ]; then | |
| echo usage: | |
| echo " svncp dest" | |
| echo " svncp src dest" | |
| return | |
| fi | |
| if [ $# -eq 1 ]; then | |
| svnURL="LC_ALL=C svn info | awk '/URL:/{print \$2}'" | |
| src=`basename svnURL` | |
| dest=$1 | |
| fi | |
| if [ $# -eq 2 ]; then | |
| src=$1 | |
| dest=$2 | |
| fi | |
| svn copy `svnroot`/${src} `svnroot`/${dest} | |
| } | |
| # 作業コピー内でsvn switchを実行 | |
| svnswitch () | |
| { | |
| if [ ! $# -eq 1 ]; then | |
| echo chose directory; | |
| return; | |
| fi; | |
| svn switch `svnroot`/$1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment