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
function svnbranchname() { | |
svn info | grep "^Relative URL" | grep -oE "[^/]+$" | |
} | |
function svnmkbranch() { | |
if [ -z "$1" ]; then | |
echo "Error: Missing new branch name arg" | |
return | |
fi | |
local url=$(svn info | grep "^URL"); url=${url:5} |
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
function svnlog() { | |
local hoursAgo=12 | |
if [ "$1" ]; then | |
hoursAgo=$1 | |
fi | |
local dateThen=$(date -v-"$hoursAgo"H "+%Y-%m-%d %H:%M:%S") | |
local dateNow=$(date "+%Y-%m-%d %H:%M:%S") | |
echo "SVN LOG: $(date "+%Y-%m-%d")" | |
svn log --search "{{ SVN username }}" -r "{$dateThen}:{$dateNow}" {{ SVN URL }} \ | |
| grep -v -e "| {{ SVN username }} |" -e "^br$" -e "^$" -e "-----" |
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
function svnbranchname() { | |
svn info | grep "^Relative URL" | grep -oE "[^/]+$" | |
} | |
function svnstash() { | |
local branchName=$(svnbranchname) | |
if [ -n "$branchName" ]; then | |
if [ ! -d "../$branchName" ]; then | |
cp -Rv . ../$branchName | |
svn revert -R . |