[PATCH 7 of 7 clowncopter] automv: switch to specifying the similarity as an integer (0-100)
Yuya Nishihara
yuya at tcha.org
Tue Feb 16 09:31:16 EST 2016
On Mon, 15 Feb 2016 17:25:01 +0000, Martijn Pieters wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters at fb.com>
> # Date 1455557082 0
> # Mon Feb 15 17:24:42 2016 +0000
> # Node ID d63407a4948f5a9ef8ddcdb077546c889dc4ce07
> # Parent 4a57546044d26cc4b2725d404ee60a11ccba3cf9
> automv: switch to specifying the similarity as an integer (0-100).
>
> This is consistent with the addremove --similarity option.
>
> diff --git a/hgext/automv.py b/hgext/automv.py
> --- a/hgext/automv.py
> +++ b/hgext/automv.py
> @@ -10,7 +10,8 @@
> comes from an unrecorded mv.
>
> The threshold at which a file is considered a move can be set with the
> -``automv.similarity`` config option; the default value is 1.00.
> +``automv.similarity`` config option. This option takes a percentage between 0
> +(disabled) and 100 (files must be identical), the default is 100.
>
> """
> from __future__ import absolute_import
> @@ -36,11 +37,12 @@
> renames = None
> disabled = opts.pop('no_automv', False)
> if not disabled:
> - threshold = float(ui.config('automv', 'similarity', '1.00'))
> + threshold = float(ui.config('automv', 'similarity', '100'))
ui.configint() can be used to avoid naked exception.
More information about the Mercurial-devel
mailing list