Jun Wu <qu...@fb.com> writes:

> # HG changeset patch
> # User Jun Wu <qu...@fb.com>
> # Date 1494382608 25200
> #      Tue May 09 19:16:48 2017 -0700
> # Node ID f736ea580edbf4ec199b55af586b31f2798cbee4
> # Parent  b022d125236c47e07db6209e4de648bb70a8de65
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r 
> f736ea580edb
> filectx: remove __new__
>
> It does not seem to be used anywhere, and breaks a later patch.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -689,7 +689,4 @@ class basefilectx(object):
>                      directory,
>      memfilectx: a filecontext that represents files in-memory."""
> -    def __new__(cls, repo, path, *args, **kwargs):
> -        return super(basefilectx, cls).__new__(cls)
> -

I remember writing __new__ for basectx due to mpm and I talking about
fast-pathing reusing a ctx without duplicating it. As for filectx, I
seem to recall wanting to do something similar for self.data but ran
into issues of cyclic dependencies later down the line.

So, yes, this patch seems fine to me.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to