[PATCH 1 of 2 V2] debug: add debugexplainunstable that explains instabilities
Yuya Nishihara
yuya at tcha.org
Tue Feb 27 10:44:49 EST 2018
On Tue, 27 Feb 2018 21:11:17 +0800, Anton Shestakov wrote:
> On Tue, 27 Feb 2018 20:45:21 +0900
> Yuya Nishihara <yuya at tcha.org> wrote:
>
> > On Mon, 26 Feb 2018 22:05:26 +0800, Anton Shestakov wrote:
> > > # HG changeset patch
> > > # User Anton Shestakov <av6 at dwimlabs.net>
> > > # Date 1519649041 -28800
> > > # Mon Feb 26 20:44:01 2018 +0800
> > > # Node ID 0aa1728931cc2c2c7d6ee0f18e0618fc17add42a
> > > # Parent aefb75730ea34f545f0756bf8441fc9ae07bf8dc
> > > debug: add debugexplainunstable that explains instabilities
> >
> > > diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
> > > --- a/mercurial/obsolete.py
> > > +++ b/mercurial/obsolete.py
> > > @@ -1039,3 +1039,35 @@ def createmarkers(repo, relations, flag=
> > > date=date, metadata=localmetadata,
> > > ui=repo.ui)
> > > repo.filteredrevcache.clear()
> > > +
> > > +def explainunstable(repo, ctx):
> >
> > I think this is an obs"util" function.
>
> I thought so too, but then I noticed that explainunstable() uses
> `bumpedfix`, which is a constant defined and documented with a pretty
> long comment in obsolete.py, and the only other use of it is
> incidentally also in obsolete.py, in a function that computes all
> phase-divergent changesets (_computephasedivergentset). Its code is
> very similar to what explainunstable function uses to explain the
> corresponding instability. So I feel that it's fine to put this function
> in the same file with the related code. Even if that file is
> obsutil.py, but then quite a bit of code from obsolete.py would need to
> be moved there too.
Thanks for considering it deeply. I don't have strong opinion, but it seems
we're slowly moving non-core parts out of obsolete.py, and templating stuff
would be non-core.
Boris, do you have any preference?
More information about the Mercurial-devel
mailing list