aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:13:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:13:48 -0800
commit96faec945f39cab38403f60f515bff43660b4dab (patch)
treee6681330a42303bb34be80d347cd01ff79f5b80a /scripts/setlocalversion
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-nvram (diff)
parentallow stripping of generated symbols under CONFIG_KALLSYMS_ALL (diff)
downloadlinux-dev-96faec945f39cab38403f60f515bff43660b4dab.tar.xz
linux-dev-96faec945f39cab38403f60f515bff43660b4dab.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits) allow stripping of generated symbols under CONFIG_KALLSYMS_ALL kbuild: strip generated symbols from *.ko kbuild: simplify use of genksyms kernel-doc: check for extra kernel-doc notations kbuild: add headerdep used to detect inclusion cycles in header files kbuild: fix string equality testing in tags.sh kbuild: fix make tags/cscope kbuild: fix make incompatibility kbuild: remove TAR_IGNORE setlocalversion: add git-svn support setlocalversion: print correct subversion revision scripts: improve the decodecode script scripts/package: allow custom options to rpm genksyms: allow to ignore symbol checksum changes genksyms: track symbol checksum changes tags and cscope support really belongs in a shell script kconfig: fix options to check-lxdialog.sh kbuild: gen_init_cpio expands shell variables in file names remove bashisms from scripts/extract-ikconfig kbuild: teach mkmakfile to be silent ...
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 72d233528ade..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" \
@@ -51,7 +56,7 @@ if hgid=`hg id 2>/dev/null`; then
fi
# Check for svn and a svn repo.
-if rev=`svn info 2>/dev/null | grep '^Revision'`; then
+if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
rev=`echo $rev | awk '{print $NF}'`
changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l`