From ff80aa97c9b4aae9449a608fe1bc3e7b5121cd66 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 2 Dec 2008 21:58:06 +0100 Subject: [PATCH] setlocalversion: add git-svn support Print svn revision in addition to git info on git-svn repos. Signed-off-by: Peter Korsgaard Signed-off-by: Sam Ravnborg --- scripts/setlocalversion | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 81d984b91594..f6946cf99ce1 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" \ -- 2.20.1