[PATCH 2 of 8] test-flagprocessor: use changegroup3 in bundle2

Yuya Nishihara yuya at tcha.org
Fri Apr 7 13:51:38 UTC 2017


On Thu, 6 Apr 2017 19:08:10 -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1491524600 25200
> #      Thu Apr 06 17:23:20 2017 -0700
> # Node ID f9c75f4ee30e0102d8fb5a65eaee988e7ca30139
> # Parent  3d62d68ed4245359b5ae5b6b6c1959a15ffa84e9
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r f9c75f4ee30e
> test-flagprocessor: use changegroup3 in bundle2
> 
> This will force "hg bundle" to use changegroup3 in the test. It is
> important since only changegroup3 preserves revlog flags.
> 
> diff --git a/tests/flagprocessorext.py b/tests/flagprocessorext.py
> --- a/tests/flagprocessorext.py
> +++ b/tests/flagprocessorext.py
> @@ -8,4 +8,5 @@ import zlib
>  from mercurial import (
>      changegroup,
> +    exchange,
>      extensions,
>      filelog,
> @@ -104,4 +105,8 @@ def extsetup(ui):
>      revlog.REVIDX_FLAGS_ORDER.extend(flags)
>  
> +    # Teach exchange to use changegroup 3
> +    for k in exchange._bundlespeccgversions.keys():
> +        exchange._bundlespeccgversions[k] = '03'

Is this a temporary hack until cg3 bundle is officially supported?



More information about the Mercurial-devel mailing list