diff options
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-x | scripts/setlocalversion | 7 |
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 | |||
19 | fi | 19 | fi |
20 | fi | 20 | fi |
21 | 21 | ||
22 | # Is this git on svn? | ||
23 | if git config --get svn-remote.svn.url >/dev/null; then | ||
24 | printf -- '-svn%s' "`git-svn find-rev $head`" | ||
25 | fi | ||
26 | |||
22 | # Are there uncommitted changes? | 27 | # Are there uncommitted changes? |
23 | git update-index --refresh --unmerged > /dev/null | 28 | git update-index --refresh --unmerged > /dev/null |
24 | if git diff-index --name-only HEAD | grep -v "^scripts/package" \ | 29 | if git diff-index --name-only HEAD | grep -v "^scripts/package" \ |
@@ -51,7 +56,7 @@ if hgid=`hg id 2>/dev/null`; then | |||
51 | fi | 56 | fi |
52 | 57 | ||
53 | # Check for svn and a svn repo. | 58 | # Check for svn and a svn repo. |
54 | if rev=`svn info 2>/dev/null | grep '^Revision'`; then | 59 | if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then |
55 | rev=`echo $rev | awk '{print $NF}'` | 60 | rev=`echo $rev | awk '{print $NF}'` |
56 | changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` | 61 | changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` |
57 | 62 | ||