[PATCH 8 of 8 clfilter-part1] clfilter: introduce `filteredrevs` attribute on changelog

Tim Delaney timothy.c.delaney at gmail.com
Sun Sep 23 18:52:30 CDT 2012


On 24 September 2012 09:08, Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

> Yes they are. For multiple reasons:
>
> (1) The `hg log -r 0` case is tricky. Hidden revision must be filtered out
> of every commands by default (for consistency).
>
>     This means filtered for revset too. You can't have "hg bundle -r
> '42::' bundles more revision than `hg log -r 42::` do.
>
>     Then we have `hg log -r 0:0` that match nothing. Should `hg log -r 0`
> do ? I do not know.
>
>     The current approach is to
>
>     A) Have global --hidden flags:
>
>         `hg log -r 0` --> no such revision
>         `hg log -r 0 --hidden` --> Display 0
>
>     B) Have a dedicated sub class on Exception to detect it's filtered
>
>         `hg log -r 0` --> Revision 0 is hidden. do you want --hidden ?
>         `hg log -r 0 --hidden` --> Display 0
>
>     C) (maybe) make several command smarter
>
>         `hg log -r 0` --> Display 0 because 0 is explicit enough
>
>     This is far from perfect but it is the best I can come up with to get
> a consistent experience for user. Any suggestion are welcome.
>

As a user, to me the most useful would be:

1. If --hidden is not on the command-line but hidden revisions would have
otherwise been selected display a message like:

"There are hidden revisions that have not been shown - use --hidden to view
them".

2. Selecting a single hidden revision without --hidden should not abort
with "no such revision" but display the above message (and not displaying
the revision).

I think this is an extension of your case B, but it would be the same
message regardless of how many hidden and non-hidden revisions were
selected.

Tim Delaney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120924/ea73dece/attachment.html>


More information about the Mercurial-devel mailing list