changeset 4755:6def53be19fb

buildrpm: fix rpm release number calculation It was broken when patch queues were in use.
author Adam Spiers <hg@adamspiers.org>
date Sat, 30 Jun 2007 01:21:41 +0100
parents e5e6dd8ba6bb
children cc7a43af709d
files contrib/buildrpm
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/buildrpm	Sun Jun 03 14:42:39 2007 +0100
+++ b/contrib/buildrpm	Sat Jun 30 01:21:41 2007 +0100
@@ -29,7 +29,7 @@
 version=`hg tags | perl -e 'while(<STDIN>){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(<STDIN>){/^(\S+)\s+(\d+)/;if($1eq"tip"){$t=$2}else{print$t-$2+1;exit}}'`
+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}}'`
 tip=`hg -q tip`
 
 # Beat up the spec file