Patchwork [4,of,4] summary: display obsolete state of parents

login
register
mail settings
Submitter Denis Laxalde
Date March 25, 2017, 1:09 p.m.
Message ID <af7190c42c1cd6ba16a9.1490447359@marimba>
Download mbox | patch
Permalink /patch/19668/
State Superseded
Delegated to: Yuya Nishihara
Headers show

Comments

Denis Laxalde - March 25, 2017, 1:09 p.m.
# HG changeset patch
# User Denis Laxalde <denis@laxalde.org>
# Date 1490437808 -3600
#      Sat Mar 25 11:30:08 2017 +0100
# Node ID af7190c42c1cd6ba16a9bd83ad54208d89f343fe
# Parent  94a70894c394268b845f427f7643738a70e336bb
# Available At https://bitbucket.org/dlax/hg-work
#              hg pull https://bitbucket.org/dlax/hg-work -r af7190c42c1c
# EXP-Topic obsolete-ui
summary: display obsolete state of parents

Extend the "parent: " lines in summary to display "(obsolete)" when the parent
is obsolete.
Yuya Nishihara - March 26, 2017, 1:56 p.m.
On Sat, 25 Mar 2017 14:09:19 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis@laxalde.org>
> # Date 1490437808 -3600
> #      Sat Mar 25 11:30:08 2017 +0100
> # Node ID af7190c42c1cd6ba16a9bd83ad54208d89f343fe
> # Parent  94a70894c394268b845f427f7643738a70e336bb
> # Available At https://bitbucket.org/dlax/hg-work
> #              hg pull https://bitbucket.org/dlax/hg-work -r af7190c42c1c
> # EXP-Topic obsolete-ui
> summary: display obsolete state of parents
> 
> Extend the "parent: " lines in summary to display "(obsolete)" when the parent
> is obsolete.

The code looks good, but I have no idea how the bulk bikeshedding about evolve
naming ended.
Denis Laxalde - March 27, 2017, 8 a.m.
Yuya Nishihara a écrit :
> On Sat, 25 Mar 2017 14:09:19 +0100, Denis Laxalde wrote:
>> # HG changeset patch
>> # User Denis Laxalde <denis@laxalde.org>
>> # Date 1490437808 -3600
>> #      Sat Mar 25 11:30:08 2017 +0100
>> # Node ID af7190c42c1cd6ba16a9bd83ad54208d89f343fe
>> # Parent  94a70894c394268b845f427f7643738a70e336bb
>> # Available At https://bitbucket.org/dlax/hg-work
>> #              hg pull https://bitbucket.org/dlax/hg-work -r af7190c42c1c
>> # EXP-Topic obsolete-ui
>> summary: display obsolete state of parents
>>
>> Extend the "parent: " lines in summary to display "(obsolete)" when the parent
>> is obsolete.
>
> The code looks good, but I have no idea how the bulk bikeshedding about evolve
> naming ended.
>

Are you referring to https://www.mercurial-scm.org/wiki/CEDVocabulary ?
It seems to me that the "obsolete" term is accepted (nor really
discussed in this page at least).
Yuya Nishihara - March 27, 2017, 2:29 p.m.
On Mon, 27 Mar 2017 10:00:34 +0200, Denis Laxalde wrote:
> Yuya Nishihara a écrit :
> > On Sat, 25 Mar 2017 14:09:19 +0100, Denis Laxalde wrote:
> >> # HG changeset patch
> >> # User Denis Laxalde <denis@laxalde.org>
> >> # Date 1490437808 -3600
> >> #      Sat Mar 25 11:30:08 2017 +0100
> >> # Node ID af7190c42c1cd6ba16a9bd83ad54208d89f343fe
> >> # Parent  94a70894c394268b845f427f7643738a70e336bb
> >> # Available At https://bitbucket.org/dlax/hg-work
> >> #              hg pull https://bitbucket.org/dlax/hg-work -r af7190c42c1c
> >> # EXP-Topic obsolete-ui
> >> summary: display obsolete state of parents
> >>
> >> Extend the "parent: " lines in summary to display "(obsolete)" when the parent
> >> is obsolete.
> >
> > The code looks good, but I have no idea how the bulk bikeshedding about evolve
> > naming ended.
> 
> Are you referring to https://www.mercurial-scm.org/wiki/CEDVocabulary ?
> It seems to me that the "obsolete" term is accepted (nor really
> discussed in this page at least).

Ah, thanks, I hadn't read it.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4826,6 +4826,8 @@  def summary(ui, repo, **opts):
                 ui.write(_(' (empty repository)'))
             else:
                 ui.write(_(' (no revision checked out)'))
+        if p.obsolete():
+            ui.write(_(' (obsolete)'))
         if p.troubled():
             ui.write(' ('
                      + ', '.join(ui.label(trouble, 'trouble.%s' % trouble)
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -851,6 +851,17 @@  test summary output
   phases: 4 draft
   unstable: 2 changesets
   bumped: 1 changesets
+  $ hg up -r 'obsolete()'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg summary
+  parent: 6:3de5eca88c00  (obsolete)
+   add obsolete_e
+  branch: default
+  commit: (clean)
+  update: 3 new changesets (update)
+  phases: 4 draft
+  unstable: 2 changesets
+  bumped: 1 changesets
 
 Test incoming/outcoming with changesets obsoleted remotely, known locally
 ===============================================================================