[PATCH 6 of 7 V3] log: add obsfate by default in changeset printer

Boris Feld boris.feld at octobus.net
Wed Oct 18 10:47:11 EDT 2017


On Wed, 2017-10-18 at 22:15 +0900, Yuya Nishihara wrote:
> On Tue, 17 Oct 2017 17:14:07 +0200, Boris Feld wrote:
> > # HG changeset patch
> > # User Boris Feld <boris.feld at octobus.net>
> > # Date 1507209918 -7200
> > #      Thu Oct 05 15:25:18 2017 +0200
> > # Node ID f3a67648b948d83038f4b0fe351a81ee042f814f
> > # Parent  a2bbc21a142b192bde003f8df3adb71e13242ea1
> > # EXP-Topic obsfatekeyword
> > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > #              hg pull https://bitbucket.org/octobus/mercurial-deve
> > l/ -r f3a67648b948
> > log: add obsfate by default in changeset printer
> > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> > --- a/mercurial/cmdutil.py
> > +++ b/mercurial/cmdutil.py
> > @@ -1665,6 +1665,9 @@
> >              self.ui.write(_("instability: %s\n") % ',
> > '.join(instabilities),
> >                            label='log.instability')
> >  
> > +        elif ctx.obsolete():
> > +            self._showobsfate(ctx)
> 
> elif? I don't know if isunstable and obsolete are mutually exclusive.

You can't be both unstable and obsolete at the same time, I just
rechecked to be sure.

> 
> > +    def _showobsfate(self, ctx):
> > +        obsfate = templatekw.showobsfate(repo=self.repo, ctx=ctx,
> > ui=self.ui)
> 
> Maybe you know, calling templatekw function here is just a hack.
> Please send
> a follow up after the release.

Right, I will have a follow-up ready for cleaning this shortcut.

> 
> > +
> > +        if obsfate:
> > +            for obsfateline in obsfate:
> > +                # i18n: column positioning for "hg log"
> > +                self.ui.write(_("obsfate:     %s\n") %
> > obsfateline,
> > +                              label='log.obsfate')


More information about the Mercurial-devel mailing list