Fix for CODETOOLS-7901466?

David DeHaven david.dehaven at
Thu Dec 17 22:56:36 UTC 2015

I've been gritting my teeth at this problem for a while, mostly just ignoring the excess comments in the output or using -C to disable comments entirely.

Today I'd had enough so I poked at this a bit and I think, from what I understand the reasons for adding --follow were, that simply changing --follow to --removed fixes this.

Post 3.4, the new behavior of --follow with -r simply changes the revision selection to reverse(::{rev}), so if we pass -r N:tip, this turns into reverse(::N:tip) which shows the entire history of the file. The second part of the description of --follow does not seem to apply when -r is specified, but --removed shows changesets where the file moved or was deleted which I believe was the point of adding --follow.


Here's my proposed patch, that should work with pre-3.4 (though I've not tested it):

--- cut here ---
diff --git a/webrev.ksh b/webrev.ksh
--- a/webrev.ksh
+++ b/webrev.ksh
@@ -1120,11 +1120,11 @@
                         for rev in $ALL_CREV; do
                             rev_opt="$rev_opt --rev $rev"
-                        comm=`hg log $rev_opt --follow --template 'rev {rev} : {desc}\n' $logf`
+                        comm=`hg log $rev_opt --removed --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 --removed --template 'rev {rev} : {desc}\n' $logf`
-		        comm=`hg log -l1 --follow --template 'rev {rev} : {desc}\n' $logf`
+		        comm=`hg log -l1 --removed --template 'rev {rev} : {desc}\n' $logf`
--- cut here ---


More information about the code-tools-dev mailing list