equal
deleted
inserted
replaced
27 tmpspec=/tmp/`basename "$specfile"`.$$ |
27 tmpspec=/tmp/`basename "$specfile"`.$$ |
28 # Use the most recent tag as the version. |
28 # Use the most recent tag as the version. |
29 version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'` |
29 version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'` |
30 # Compute the release number as the difference in revision numbers |
30 # Compute the release number as the difference in revision numbers |
31 # between the tip and the most recent tag. |
31 # between the tip and the most recent tag. |
32 release=`hg tags | perl -e 'while(<STDIN>){/^(\S+)\s+(\d+)/;if($1eq"tip"){$t=$2}else{print$t-$2+1;exit}}'` |
32 release=`hg tags | perl -e 'while(<STDIN>){($tag,$id)=/^(\S+)\s+(\d+)/;if($tag eq "tip"){$tip = $id}elsif($tag=~/^\d/){print $tip-$id+1;exit}}'` |
33 tip=`hg -q tip` |
33 tip=`hg -q tip` |
34 |
34 |
35 # Beat up the spec file |
35 # Beat up the spec file |
36 sed -e 's,^Source:.*,Source: /dev/null,' \ |
36 sed -e 's,^Source:.*,Source: /dev/null,' \ |
37 -e "s,^Version:.*,Version: $version," \ |
37 -e "s,^Version:.*,Version: $version," \ |