# HG changeset patch # User Rob Landley # Date 1246349104 18000 # Node ID dc19e20734ca0fb022cd79b2a3ddc8b1dbfd21b2 # Parent 3d5fdc78af9079e7723880a00a424ae79714cdbe Use the git magic tarball comment field to get the version number of unstable git packages for MANIFEST. diff -r 3d5fdc78af90 -r dc19e20734ca sources/functions.sh --- a/sources/functions.sh Mon Jun 29 18:34:35 2009 -0500 +++ b/sources/functions.sh Tue Jun 30 03:05:04 2009 -0500 @@ -451,6 +451,22 @@ { if unstable "$1" then + for i in "b" "" + do + FILE="$(echo "$SRCDIR/alt-$1-"*.tar.$i*)" + if [ -f "$FILE" ] + then + GITID="$(${i}zcat "$FILE" | git get-tar-commit-id)" + if [ ! -z "$GITID" ] + then + # The first dozen chars should form a unique id. + + echo $GITID | sed 's/^\(................\).*/git \1/' + return + fi + fi + done + # Need to extract unstable packages to determine source control version. EXTRACT_ONLY=1 setupfor "$1" >&2 @@ -468,13 +484,6 @@ $(hg tip | sed -n 's/changeset: *\([0-9]*\).*/\1/p') ) return 0 - elif [ -d "$DIR/.git" ] - then - ( echo git rev \ - $(git show master --pretty=format:%H | - sed -n '1s/^\(............\).*/\1/p') - ) - return 0 fi fi