svn command line logging

1. svn version number

Method 1. You can get the svn version number on the command line

`svnversion -c |sed 's/^.*://' |sed 's/[AZ]*$//'` to see if you can get the version number 

Method 2. Can be used in command line and script files

    where ${srcPath} is the working directory of svn

svnRev=`svn info  ${srcPath} | grep "Last Changed Rev" | grep "[0-9]*"`

svnV=`echo $svnInfo|grep -o '[0-9]\+'`
echo "svnV: " ${svnV}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324882652&siteId=291194637