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

Yuya Nishihara yuya at tcha.org
Wed Oct 18 09:15:27 EDT 2017


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-devel/ -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.

> +    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.

> +
> +        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