Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77946
b: refs/heads/master
c: 3dce174
h: refs/heads/master
v: v3
  • Loading branch information
Aron Griffis authored and Sam Ravnborg committed Jan 28, 2008
1 parent a1f93b7 commit b12f24c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f4b489b77c68b9cba1bd9dec5a1bbf0ab3c47f8
refs/heads/master: 3dce174cfcba11026b028d33bed0438b80e37124
23 changes: 23 additions & 0 deletions trunk/scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,27 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
if git diff-index HEAD | read dummy; then
printf '%s' -dirty
fi

# All done with git
exit
fi

# Check for mercurial and a mercurial repo.
if hgid=`hg id 2>/dev/null`; then
tag=`printf '%s' "$hgid" | cut -d' ' -f2`

# Do we have an untagged version?
if [ -z "$tag" -o "$tag" = tip ]; then
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
printf '%s%s' -hg "$id"
fi

# Are there uncommitted changes?
# These are represented by + after the changeset id.
case "$hgid" in
*+|*+\ *) printf '%s' -dirty ;;
esac

# All done with mercurial
exit
fi

0 comments on commit b12f24c

Please sign in to comment.