[PATCH 4 of 4 V2] parsers: pure implementation of the new dirstate ordering
Sean Farley
sean at farley.io
Tue Dec 1 02:18:14 UTC 2015
Laurent Charignon <lcharignon at fb.com> writes:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1448411881 28800
> # Tue Nov 24 16:38:01 2015 -0800
> # Node ID f9959f2e4cd73d0bf06c6a325c4a33e4f5bd1a04
> # Parent 749f9f5d6476c60ba9841415e4e94358fe3adf01
> parsers: pure implementation of the new dirstate ordering
>
> This patch makes the pure implementation of pack_dirstate up to date with the
> C implementation. It effectively writes the dirstate starting with the
> non-normal files and ends with the normal files.
>
> diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
> --- a/mercurial/pure/parsers.py
> +++ b/mercurial/pure/parsers.py
> @@ -88,8 +88,13 @@ def pack_dirstate(dmap, copymap, pl, now
> cs = cStringIO.StringIO()
> write = cs.write
> write("".join(pl))
> - if True:
> + # First pass: non normal files, second pass: normal files to improve status
> + # performance as status generally only need the non normal files
> + for _pass in [0, 1]:
Very minor nit: this should probably be (0, 1) since we're not modifying
_pass.
More information about the Mercurial-devel
mailing list