Patchwork context: correct metadataonlyctx's parameter

login
register
mail settings
Submitter Jun Wu
Date Dec. 16, 2016, 9:09 p.m.
Message ID <3fc3d354a914130460f6.1481922568@x1c>
Download mbox | patch
Permalink /patch/17938/
State Accepted
Headers show

Comments

Jun Wu - Dec. 16, 2016, 9:09 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1481922159 0
#      Fri Dec 16 21:02:39 2016 +0000
# Node ID 3fc3d354a914130460f6d37fbe7c1aef412a14ce
# Parent  be520fe3a3e95edb4a8db75d424ed067cb5bf706
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 3fc3d354a914
context: correct metadataonlyctx's parameter

It's "originalctx", not "path" as Yuya pointed in [1].

[1]: www.mercurial-scm.org/pipermail/mercurial-devel/2016-December/091508.html
Augie Fackler - Dec. 16, 2016, 10:27 p.m.
On Fri, Dec 16, 2016 at 09:09:28PM +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1481922159 0
> #      Fri Dec 16 21:02:39 2016 +0000
> # Node ID 3fc3d354a914130460f6d37fbe7c1aef412a14ce
> # Parent  be520fe3a3e95edb4a8db75d424ed067cb5bf706
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r 3fc3d354a914
> context: correct metadataonlyctx's parameter


Queued, thanks

>
> It's "originalctx", not "path" as Yuya pointed in [1].
>
> [1]: www.mercurial-scm.org/pipermail/mercurial-devel/2016-December/091508.html
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -1992,5 +1992,5 @@ class metadataonlyctx(committablectx):
>      metadata or is left empty.
>      """
> -    def __new__(cls, repo, path, *args, **kwargs):
> +    def __new__(cls, repo, originalctx, *args, **kwargs):
>          return super(metadataonlyctx, cls).__new__(cls, repo)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1992,5 +1992,5 @@  class metadataonlyctx(committablectx):
     metadata or is left empty.
     """
-    def __new__(cls, repo, path, *args, **kwargs):
+    def __new__(cls, repo, originalctx, *args, **kwargs):
         return super(metadataonlyctx, cls).__new__(cls, repo)