[PATCH] automv: new experimental extension

Augie Fackler raf at durin42.com
Sat Feb 13 18:20:04 EST 2016


On Mon, Feb 08, 2016 at 01:56:38PM +0000, Martijn Pieters wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters at fb.com>
> # Date 1454939571 0
> #      Mon Feb 08 13:52:51 2016 +0000
> # Node ID fb91a65f102ca34d69961142ad84955080ada1fc
> # Parent  3026a9107f9e40ba5d63bdae7e81c48db8885fe2
> automv: new experimental extension

This looks great to me, with one minor nitpick (see below).

>
> Automatically detect moves and record them at commit time.
>
> This extension was originally developed at
> https://bitbucket.org/facebook/hg-experimental
>
> diff --git a/hgext/automv.py b/hgext/automv.py
> new file mode 100644
> --- /dev/null
> +++ b/hgext/automv.py
> @@ -0,0 +1,83 @@
> +# automv.py
> +#
> +# Copyright 2013-2016 Facebook, Inc.
> +#
> +# This software may be used and distributed according to the terms of the
> +# GNU General Public License version 2 or any later version.
> +"""Check for unrecorded moves at commit time (EXPERIMENTAL)
> +
> +This extension checks at commit/amend time if any of the committed files
> +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.

I think we should document this value as being something we reserve
the right to refine later, after doing some history analysis. I
suspect we can do some analysis over firefox/facebook/google/whatever
histories and come up with a better value than 1.0 as a default.

> +
> +"""


More information about the Mercurial-devel mailing list