1. Perry Metzger
  2. growl


Peter Hosey  committed f5c4f91

Fix the generateHgRevision script for copies of the source code that aren't checkouts of hg repositories.

  • Participants
  • Parent commits 81dc4c2
  • Branches default

Comments (0)

Files changed (1)

File generateHgRevision.sh

View file
  • Ignore whitespace
 #nonetheless, we should handle it sanely. We do this by only showing the
 #first parent.
 REVISION=`hg parent --template="{rev}\n" | head -n1`
+if [[ "x$REVISION" = "x" ]]; then
+	#This is not an hg repository. It's probably an archive. Try to determine the archived revision.
+	REVISION=`/usr/bin/sed -E -n '/^node:/{ s/node: //; s/^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]).*/\1/; p; q; }' < "${SRCROOT}/.hg_archival.txt"`
+	if [[ "x$REVISION" = "x" ]]; then
+		#Not an archive, either. Weird.
+	fi
 echo "*** Building Growl Revision: $REVISION"
 mkdir -p "`dirname "$HEADERPATH"`"