Skip to content

Commit ff80aa9

Browse files
jacmetsravnborg
authored andcommitted
setlocalversion: add git-svn support
Print svn revision in addition to git info on git-svn repos. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 167d6a0 commit ff80aa9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎scripts/setlocalversion‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
1919
fi
2020
fi
2121

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+
2227
# Are there uncommitted changes?
2328
git update-index --refresh --unmerged > /dev/null
2429
if git diff-index --name-only HEAD | grep -v "^scripts/package" \

0 commit comments

Comments
 (0)