简体   繁体   中英

SVN Log Get revision number from specific commit

Im using Subversion on a linux system

Im trying to get the revision numbers of specific commits based upon their commit logs (message).

When a revision is updated with the value of YI run a script to check to if any revisions contain that text, however I cant retrieve the actual revision number. I want to capture this number to target specific files to merge.

this is the log script Im using

svn log [SVN_URL] -v | grep 'Y'

and this is what returned when run

<Tested></Tested> , but not the revision number.

Any ideas?

Thanks

  1. If your search-string is part of commit-message, -v is not needed (it adds only filelist for revision)
  2. If you use SVN 1.8, you can have log+grep in one command svn log ... --search Y
  3. In order to get revision from (filtered by keyword) log, you have to use something like | grep "|" | gawk {print $1} | grep "|" | gawk {print $1} | grep "|" | gawk {print $1} after svn log

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM