Fix for CODETOOLS-7901466?
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri Dec 18 00:24:30 UTC 2015
David,
Thanks for the contribution.
Are there any Mercurial experts who can review the changes here, and/or
what would it take to test this on appropriate versions of Mercurial?
-- Jon
On 12/17/2015 02:56 PM, David DeHaven wrote:
> 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.
>
> Thoughts?
>
> 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"
> done
> - 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`
> else
> - comm=`hg log -l1 --follow --template 'rev {rev} : {desc}\n' $logf`
> + comm=`hg log -l1 --removed --template 'rev {rev} : {desc}\n' $logf`
> fi
> else
> comm=""
> --- cut here ---
>
> -DrD-
>
More information about the code-tools-dev
mailing list