简体   繁体   中英

List all the revisions in a mixed revision SVN working copy

SVN working copy has mixed revisions in the general case. Is there a way to list all its revision numbers?

For example, for the following working copy:

file01   (revision 1)
file02   (revision 2)
file02.2 (revision 2)
file03   (revision 3)

The list of the revisions would be 1, 2, 3 .

svnversion comes close, but not close enough:

$ svnversion
1:3

Using svn info , awk and sed , this

svn info -R | awk '/Revision/ {print $2;}' | sort -u

produces the following if invoked in the working directory root:

1
2
3

Such multi-line output can further be transformed into single-line form using techniques from Bash turning multi-line string into single comma-separated question. Eg

svn info -R | awk '/Revision/ {print $2;}' | sort -u | paste -s -d,

produces 1,2,3 .

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