webrev prints too many bug descriptions now

Wang Weijun weijun.wang at oracle.com
Mon Nov 2 08:02:10 UTC 2015


Hi All

I usually call webrev with "-r -2" because -1 is an applied MQ patch. Recently I see it generates webrev files with too many bug description lines. After some investigation it looks like "hg -r something --folow" is the reason.

According to Matt Mackall, the hg author [1]:

   Prior to 3.4, [--follow] had an undefined behavior in combination
   with -r and probably should have generated an error. Now, together
   with -r, it means "follow history from this revision".

I am not sure exactly why --follow is used in webrev, but I tried a small change and only one bug description (the one for my MQ patch) is shown.

diff --git a/webrev.ksh b/webrev.ksh
--- a/webrev.ksh
+++ b/webrev.ksh
@@ -1122,7 +1122,7 @@
                         done
                         comm=`hg log $rev_opt --follow --template 'rev {rev} : {desc}\n' $logf`
                     elif [[ -n $FIRST_CREV ]]; then
-		        comm=`hg log --rev $FIRST_CREV:tip --follow --template 'rev {rev} : {desc}\n' $logf`
+		        comm=`hg log --rev $FIRST_CREV:tip --template 'rev {rev} : {desc}\n' $logf`
                     else
 		        comm=`hg log -l1 --follow --template 'rev {rev} : {desc}\n' $logf`
                     fi

I haven't touched those not using -r.

Thanks
Max

[1] https://selenic.com/pipermail/mercurial/2015-October/048831.html


More information about the webrev-dev mailing list