summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-28 11:47:25 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-28 11:47:25 +0000
commitf196a813db4d531ff6577adb88425e1dd606fb9a (patch)
tree08ddf8c7a57bd48b927224c10ba881fd6972629a
parent202b7d11fbae57ec1deddc0397019626ba9ab464 (diff)
git/svn: check if our git rev corresponds to some svn rev
-rwxr-xr-xbin/rbot6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/rbot b/bin/rbot
index 1a879380..98bc3339 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -51,7 +51,11 @@ if $version =~ /svn/
branch = $1.dup || "unknown"
changed = git_out.match(/^# Change(.*)\n/)
rev = "revision "
- rev << `git rev-parse HEAD`[0..5]
+ git_out = `git log -1 --pretty=format:"%h%n%b"`.split("\n")
+ rev << git_out.first
+ if git_out.last.match(/^git-svn-id: \S+@(\d+)/)
+ rev << "(svn #{$1})"
+ end
rev << ", local changes" if changed
$version << " (#{branch} branch, #{rev})"