summaryrefslogtreecommitdiffstats
path: root/scripts/svnversions
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/svnversions
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/svnversions')
-rwxr-xr-xscripts/svnversions51
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/svnversions b/scripts/svnversions
new file mode 100755
index 00000000..fbdca03b
--- /dev/null
+++ b/scripts/svnversions
@@ -0,0 +1,51 @@
+#! /usr/bin/env bash
+unset LANG LC_ALL
+LC_ALL=C
+export LC_ALL
+
+if [ $# -eq 1 ]; then
+ svn info $1 | awk '/^Last Changed Rev/ { print $4 }'
+else
+ for f; do
+ svn info $f | awk "/^Last Changed Rev/ { print \"$f\", \$4 }"
+ done
+fi
+
+exit
+
+=head1 NAME
+
+svnversions -- Displays version of the files passed as argument.
+
+=head1 SYNOPSIS
+
+ svnversions <file1> [<file2> [...]]
+
+=head1 DESCRIPTION
+
+svnversions displays the last revision a file in Subversion was
+changed, as known by the local checked out directory. No connection is
+required to the Subversion server. It is equivalent to the "COMMITTED"
+revision name.
+
+Unlike svnversion(1), this program returns the revision a file was
+modified. svnversion(1) tells the revision a working dir is at.
+
+It can be used in other scripts, or simply to ask for diffs using
+
+svn diff -r [<version>:]<version> <file(s)>
+
+=head1 AUTHOR
+
+Thiago Macieira <thiago@kde.org>
+
+Inspired on cvsversion, written by
+David Faure <faure@kde.org>
+
+=head1 SEE ALSO
+
+This command parses the output from 'svn info'.
+
+ svn(1), svnversion(1)
+
+=cut