[PATCH 35 of 35 V2] workingctx: inherit from context instead of changectx
Yuya Nishihara
yuya at tcha.org
Thu Sep 19 10:37:29 CDT 2013
On Wed, 18 Sep 2013 15:12:46 -0500, Sean Farley wrote:
> yuya at tcha.org writes:
> > On Wed, 07 Aug 2013 18:51:49 -0500, Sean Farley wrote:
> >> # HG changeset patch
> >> # User Sean Farley <sean.michael.farley at gmail.com>
> >> # Date 1375746258 18000
> >> # Mon Aug 05 18:44:18 2013 -0500
> >> # Node ID 3bfef4b7625282b14f5727aaefbcb906af804262
> >> # Parent 28a28810fa48edc0521df4a68b296560e9017a1b
> >> workingctx: inherit from context instead of changectx
> >>
> >> diff --git a/mercurial/context.py b/mercurial/context.py
> >> --- a/mercurial/context.py
> >> +++ b/mercurial/context.py
> >> @@ -808,11 +808,11 @@
> >> sc2 = str(c2)
> >> if sc2 not in self._copycache:
> >> self._copycache[sc2] = copies.pathcopies(c2)
> >> return self._copycache[sc2]
> >>
> >> -class workingctx(changectx):
> >> +class workingctx(context):
> >> """A workingctx object makes access to data related to
> >
> > This removed obsolete(), extinct(), etc. from workingctx. Was it by design?
>
> It was a wrong assumption on my part. Thanks for pointing it out to me.
>
> > In TortoiseHg, we have patchctx class [1] which represents unapplied patches.
> > I want to know if we should
> >
> > - remove dummy obsolete(), etc. from our patchctx
> > - and test isinstance(ctx, changectx) prior to ctx.obsolete()
> >
> > [1]: https://bitbucket.org/tortoisehg/thg/src/33d9b9fee438/tortoisehg/util/patchctx.py
>
> A fix has been pushed to default already so you shouldn't have to do
> anything new. In the near future, you might want to look into inheriting
> from workingctx or even memctx.
Confirmed the fix, thank you. I'll watch further improvements in context
module.
Regards,
More information about the Mercurial-devel
mailing list