From: Peter Korsgaard <jacmet@sunsite.dk>
To: sam@ravnborg.org, linux-kernel@vger.kernel.org
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Subject: [PATCH] setlocalversion: add git-svn support
Date: Tue, 2 Dec 2008 21:58:06 +0100 [thread overview]
Message-ID: <1228251486-29275-2-git-send-email-jacmet@sunsite.dk> (raw)
In-Reply-To: <1228251486-29275-1-git-send-email-jacmet@sunsite.dk>
Print svn revision in addition to git info on git-svn repos.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
scripts/setlocalversion | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 81d984b..f6946cf 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
fi
fi
+ # Is this git on svn?
+ if git config --get svn-remote.svn.url >/dev/null; then
+ printf -- '-svn%s' "`git-svn find-rev $head`"
+ fi
+
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
--
1.5.6.5
next prev parent reply other threads:[~2008-12-02 20:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 20:58 [PATCH] setlocalversion: print correct subversion revision Peter Korsgaard
2008-12-02 20:58 ` Peter Korsgaard [this message]
2008-12-03 7:24 ` Sam Ravnborg
2008-12-03 21:58 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1228251486-29275-2-git-send-email-jacmet@sunsite.dk \
--to=jacmet@sunsite.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®