Skip to content

Commit

Permalink
setlocalversion: add git-svn support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Korsgaard authored and Sam Ravnborg committed Dec 3, 2008
1 parent 167d6a0 commit ff80aa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit ff80aa9

Please sign in to comment.