update svn-merge-branch to accept directory argument

This commit is contained in:
Josh Holtrop 2011-01-06 13:09:14 -05:00
parent 63e17009bd
commit 2138b1fc8f

View File

@ -29,12 +29,12 @@ function svn-branch()
} }
function svn-merge-branch() function svn-merge-branch()
{ {
# assumes you are in the working copy "trunk" directory # usage: svn-merge-branch branch-name branch-dir -m "comment"
# usage: svn-merge-branch branch-name -m "comment"
branch_name="$1" branch_name="$1"
shift 1 branch_dir="$2"
shift 2
branch_rev=$(svn log --stop-on-copy `svn-root`/branches/"$branch_name" | egrep -A1 -- '-{50}' | egrep '^r[0-9]+' | tail -n 1 | sed -re 's/^r([0-9]+).*/\1/') branch_rev=$(svn log --stop-on-copy `svn-root`/branches/"$branch_name" | egrep -A1 -- '-{50}' | egrep '^r[0-9]+' | tail -n 1 | sed -re 's/^r([0-9]+).*/\1/')
svn merge -r${branch_rev}:HEAD `svn-root`/branches/"$branch_name" "$@" svn merge -r${branch_rev}:HEAD `svn-root`/branches/"$branch_name""$branch_dir" "$@"
} }
alias cribbage='cribbage -r' alias cribbage='cribbage -r'
alias backgammon='backgammon -r -pb' alias backgammon='backgammon -r -pb'