[PATCH 1 of 3 V2] summary: add a phase line (draft, secret) to the output

Matt Mackall mpm at selenic.com
Sun May 17 17:33:10 CDT 2015


On Sat, 2015-05-16 at 00:59 -0700, Pierre-Yves David wrote:
> 
> On 05/16/2015 12:27 AM, Gilles Moris wrote:
> > Le 16/05/2015 07:52, Pierre-Yves David a écrit :
> >>
> >>
> >> On 05/15/2015 02:09 AM, Gilles Moris wrote:
> >>> # HG changeset patch
> >>> # User Gilles Moris <gilles.moris at free.fr>
> >>> # Date 1431617918 -7200
> >>> #      Thu May 14 17:38:38 2015 +0200
> >>> # Node ID b51d7e3407dd0be0807c887c9b6fb82bebf57bf6
> >>> # Parent  d1bd0fd07ee6adf4ab3be2b0a0a7c0df54d55abf
> >>> summary: add a phase line (draft, secret) to the output
> >>>
> >>> The number of draft and secret changesets are currently not summarized.
> >>> This is an important information because the number of drafts give
> >>> some rough
> >>> idea of the number of outgoing changesets in typical workflows,
> >>> without needing
> >>> to probe a remote repository. And a non-zero number of secrets means
> >>> that
> >>> those changeset will not be pushed.
> >>>
> >>> If the repository is "dirty" - some draft or secret changesets exists
> >>> - then
> >>> summary will display a line like:
> >>>
> >>> phases: X draft, Y secret (public)
> >>
> >> I like the idea of showing phases in summary a lot.
> >>
> >> But I'm not a fan of the (public) here. I feel like it is too obscure
> >> for a user to link it with the current working directory parents .
> >> In the mean time, we already have parent related information in
> >> summary, could we add (non public) phases information in this parent
> >> display? I feel it would be much clearer.
> >>
> > Yes, it makes sense.
> > But this will probably need to be marked as (BC), as it will change the
> > display of all non public commit.
> > And it will need a follow up patch as it has already been pushed.
> >
> >> (even if I know that (<data>) usually related to working directory I
> >> do not feel like the parent information fit there. Maybe we could have
> >> the phase of the future commit there (draft or secret, depending of
> >> config and parents).
> >>
> >>
> > So this would display something like (if
> > --config=phases.new-commit=secret):
> >
> > parent: 2:ab91dfabc5ad
> >   public commit
> > parent: 3:24f1031ad244 tip (draft)
> >   draft commit
> > branch: default
> > commit: 1 modified, 1 unknown, 1 unresolved (merge)
> > update: (current)
> > phases: 1 draft (secret)
> 
> this was my proposal, but seeing it written still make me uncomfortable 
> with this (secret), we should probably move it the "commit:" line where 
> it make more sense:
> 
> parent: 2:ab91dfabc5ad
>    public commit
> parent: 3:24f1031ad244 tip [draft]
>    draft commit
> branch: default
> commit: 1 modified, 1 unknown, 1 unresolved (merge) [secret]
> update: (current)
> phases: 1 draft
> 
> 
> (I'm trying the use of something else than () in the process as a lead.

NAK. You can't add stuff to existing lines and you can't invent new
display styles. This is how you confuse stupid^Wtypical parsers. If it's
phase-related, it has to go on the phases: line.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list