[PATCH 2 of 2 v2] acl: support revsets [RFC]

timeless timeless at gmail.com
Wed May 11 08:36:50 EDT 2016


> An unfortunate side-effect of this change is that I've lost
> the reporting indicating why a commit was rejected.
>
> It's possible to re-engineer things so that such reporting could be
> done.

Pierre-Yves David wrote:
> We can probably have a config to report a [specific] message for a rule, don't
> we?

Even if it wasn't merging rules (and unrolling rules and running them
individually isn't a big deal), w/o some effort, you still lose
information.

The old rule could tell you which file in a commit violated a rule.
Unless someone writes a revset for each file individually, and unless
we have it reporting the revset rule item, it's unclear to me how well
a user will be able to understand the error.

worse, if the server is using custom revsets, it's possible that
reporting a revset to the user won't enable the user to run the revset
to get an answer. At the very least, the server would need to consider
spitting out a table of all transcluded revset aliases.

But the bigger part of "understanding a revset match"... really isn't
something that ACL should worry about. It's more something that
log/revset/something should offer to handle. If a user presents a
revset to hg, it should be possible for hg to explain why the revset
applies to a rev.

In log form, that could mean highlighting the matching parts (e.g.
colorizing the file()s that match and the desc() that matches,
possibly indicating ancestors that are connected or something). This
is well beyond what could possibly be considered by ACL, and isn't
something I'm up for doing.


More information about the Mercurial-devel mailing list