[PATCH 5 of 5] record: move parsepatch from record to patch

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Mar 10 12:33:57 CDT 2015



On 03/10/2015 10:13 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1425932185 25200
> #      Mon Mar 09 13:16:25 2015 -0700
> # Node ID 323dbfcc38e7bff0a0871a245db32d0e3e56a0c3
> # Parent  eac882857c2144dd4d249ca8ae364fe4c1ee8113
> record: move parsepatch from record to patch
>
> Part of a serie of patches to move record from hgext to core
>
> diff --git a/hgext/record.py b/hgext/record.py
> --- a/hgext/record.py
> +++ b/hgext/record.py
> @@ -10,95 +10,14 @@
>   from mercurial.i18n import _
>   from mercurial import cmdutil, commands, extensions, hg, patch
>   from mercurial import util
> -from mercurial.patch import header
> -from mercurial.patch import recordhunk as hunk
>   from mercurial.patch import scanpatch
> +from mercurial.patch import parsepatch
>   import copy, cStringIO, errno, os, re, shutil, tempfile

The series looks good to me but the test highly disagree

The import scheme used here is breaking demand import so we should go 
back to module import only. But not doing this in this series leave the 
code movement purer and less risky. I would be happy to have a final 
patch removing the `from X import Y` forms

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list