File indexing completed on 2025-01-26 05:13:51
0001 #! /bin/sh 0002 unset LANG LC_ALL 0003 LC_ALL=C 0004 export LC_ALL 0005 0006 if [ $# -eq 1 ]; then 0007 svn info "$1" | awk '/^Last Changed Rev/ { print $4 }' 0008 else 0009 for f; do 0010 svn info "$f" | awk "/^Last Changed Rev/ { print \"$f\", \$4 }" 0011 done 0012 fi 0013 0014 exit 0015 0016 =head1 NAME 0017 0018 svnversions -- Displays version of the files passed as argument. 0019 0020 =head1 SYNOPSIS 0021 0022 svnversions <file1> [<file2> [...]] 0023 0024 =head1 DESCRIPTION 0025 0026 svnversions displays the last revision a file in Subversion was 0027 changed, as known by the local checked out directory. No connection is 0028 required to the Subversion server. It is equivalent to the "COMMITTED" 0029 revision name. 0030 0031 Unlike svnversion(1), this program returns the revision a file was 0032 modified. svnversion(1) tells the revision a working dir is at. 0033 0034 It can be used in other scripts, or simply to ask for diffs using 0035 0036 svn diff -r [<version>:]<version> <file(s)> 0037 0038 =head1 AUTHOR 0039 0040 Thiago Macieira <thiago@kde.org> 0041 0042 Inspired on cvsversion, written by 0043 David Faure <faure@kde.org> 0044 0045 =head1 SEE ALSO 0046 0047 This command parses the output from 'svn info'. 0048 0049 svn(1), svnversion(1) 0050 0051 =cut