# HG changeset patch # User Adam Spiers # Date 1183162901 -3600 # Node ID 6def53be19fbb3d9d38a35689da5378cb0855823 # Parent e5e6dd8ba6bb5f964b6b8b307eb2c86b7f25679f buildrpm: fix rpm release number calculation It was broken when patch queues were in use. diff --git a/contrib/buildrpm b/contrib/buildrpm --- a/contrib/buildrpm +++ b/contrib/buildrpm @@ -29,7 +29,7 @@ tmpspec=/tmp/`basename "$specfile"`.$$ version=`hg tags | perl -e 'while(){if(/^(\d\S+)/){print$1;exit}}'` # Compute the release number as the difference in revision numbers # between the tip and the most recent tag. -release=`hg tags | perl -e 'while(){/^(\S+)\s+(\d+)/;if($1eq"tip"){$t=$2}else{print$t-$2+1;exit}}'` +release=`hg tags | perl -e 'while(){($tag,$id)=/^(\S+)\s+(\d+)/;if($tag eq "tip"){$tip = $id}elsif($tag=~/^\d/){print $tip-$id+1;exit}}'` tip=`hg -q tip` # Beat up the spec file