[PATCH 1 of 4 evolve-ext] metaedit: add a helper function for just metadata rewrites

Ryan McElroy rm at fb.com
Mon Dec 5 08:14:28 EST 2016



On 11/16/16 7:56 PM, Mateusz Kwapich wrote:
> # HG changeset patch
> # User Mateusz Kwapich <mitrandir at fb.com>
> # Date 1479324110 0
> #      Wed Nov 16 19:21:50 2016 +0000
> # Branch stable
> # Node ID 744c6acd84edf73ffdf505b9673b0383db727a0e
> # Parent  727c7211c810d304ebf92b32db7ecf697ce46ac6
> metaedit: add a helper function for just metadata rewrites
>
> It will be used by metaedit.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -907,6 +907,13 @@ def rewrite(repo, old, updates, head, ne
>       finally:
>           lockmod.release(tr, lock, wlock)
>   
> +def metarewrite(repo, old, newbases, commitopts):
> +    '''Like rewrite but affects only the changeset metadata.'''
> +    # TODO: reuse the manifest for speed

Your series that Augie just pushed will allow this, right?

> +    newid, created = rewrite(repo, old, [old], old, newbases,
> +                             commitopts=commitopts)
> +    return newid, created
> +
>   class MergeFailure(error.Abort):
>       pass
>   
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.org_mailman_listinfo_mercurial-2Ddevel&d=DgIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=Jw8rundaE7TbmqBYd1txIQ&m=YCkHlLMnHn6746uuOC4o1htmMJMd23PHmzWwVptEX1w&s=T2IK_Oh5Ed9IRQXP8D2nffaVydBlkYV2wtjghV29wUk&e=



More information about the Mercurial-devel mailing list