Commit Graph

59 Commits

Author SHA1 Message Date
Pierre-Yves David
30913031d4 error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.

For great justice.
2015-10-08 12:55:45 -07:00
Matt Mackall
0dd375ec19 acl: mark deprecated config option
This option has been undocumented since day 0.
2015-06-25 17:36:46 -05:00
Augie Fackler
f95a6caba1 extensions: document that testedwith = 'internal' is special
Extension authors (notably at companies using hg) have been
cargo-culting the `testedwith = 'internal'` bit from hg's own
extensions, which then defeats our "file bugs over here" logic in
dispatch. Let's be more aggressive about trying to give extension
authors a hint about what testedwith should say.
2015-04-28 16:44:37 -04:00
Mads Kiilerich
1e900bb145 check-code: check for spaces around = for named parameters 2013-10-03 14:50:47 +02:00
FUJIWARA Katsunori
0cf97588a4 doc: unify section level between help topics
Some help topics use "-" for the top level underlining section mark,
but "-" is used also for the top level categorization in generated
documents: "hg.1.html", for example.

So, TOC in such documents contain "sections in each topics", too.

This patch changes underlining section mark in some help topics to
unify section level in generated documents.

After this patching, levels of each section marks are:

  level0
  """"""
    level1
    ======
      level2
      ------
        level3
        ......
          level4
          ######

And use of section markers in each documents are:

  - mercurial/help/*.txt can use level1 or more
    (now these use level1 and level2)

  - help for core commands can use level2 or more
    (now these use no section marker)

  - descriptions of extensions can use level2 or more
    (now hgext/acl uses level2)

  - help for commands defined in extension can use level4 or more
    (now "convert" of hgext/convert uses level4)

"Level0" is used as top level categorization only in "doc/hg.1.txt"
and the intermediate file generated by "doc/gendoc.py", so end users
don't see it in "hg help" outoput and so on.
2012-07-25 16:40:38 +09:00
Elifarley Callado Coelho Cruz
6010752603 acl: user docs for the "!" prefix in user or group names 2012-05-30 21:47:51 -03:00
Elifarley Callado Coelho Cruz
589d45cced acl: use of "!" prefix in user or group names
The "!" prefix allows you to prevent anyone except a given user or group to push
changesets in a given branch or path.

This patch enables a use case suggested by a user (Julien Bonnet):
There's a branch that only a given user (or group) should be able to push to,
and you don't want to restrict access to any other branch that may be created.

With the "!" prefix, you simply deny access to "!givenuser" (or "!@givengroup").
2012-05-28 19:45:15 -03:00
Elifarley Callado Coelho Cruz
cec9c9df29 acl: 'util.never' can be used instead of a more complex expression 2012-05-18 13:50:02 -03:00
Elifarley Callado Coelho Cruz
1067ca9f4d acl: perform some computations earlier, so that returned lambda functions are simpler 2012-05-18 13:47:44 -03:00
Elifarley Callado Coelho Cruz
8abcac61ac acl: added some comments to easily identify branch- and path-based verifications 2012-05-18 12:48:24 -03:00
Elifarley Callado Coelho Cruz
af1550b687 acl: 'util.never' used 2012-05-18 12:40:04 -03:00
Elifarley Callado Coelho Cruz
f8e43e8050 acl: cleanup 2012-05-18 12:37:23 -03:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
FUJIWARA Katsunori
7f1ccfb7bd doc: fix explanation comment in acl extension
according to configuration in "acl.deny" below, group "@hg-denied"
also be denied for all files, so add such description to comment for
configuration.

  [acl.deny]
  # user6 will not have write access to any file:
  ** = user6
  # Group "hg-denied" will not have write access to any file:
  ** = @hg-denied
2012-04-23 00:29:04 +09:00
Elifarley Callado Coelho Cruz
65983907f2 acl: more descriptive error messages 2011-10-06 19:45:26 -03:00
Erik Zielke
dd7e779d17 help: different section separators
Changes the characters used as section separators, so different ones
are used for module docstring and command docstring.

This is done because the section from the docstring will be at
different levels in the restructured text output, therefore
different symbols have to be used.
2010-10-19 13:39:34 +02:00
Martin Geisler
f08fb80ec0 acl: delete trailing whitespace in docstring 2010-06-20 19:48:28 +02:00
Patrick Mezard
82b9bdbce9 acl: improve undefined group error handling 2010-05-10 21:44:00 +02:00
Patrick Mezard
842d65c40f acl: grp module is not available on windows 2010-05-10 21:09:48 +02:00
Patrick Mezard
f781589aef acl: clarify acl.sources, fix typo 2010-05-09 20:12:45 +02:00
Elifarley Callado Coelho Cruz
6a180e3b5f acl: update docstring to describe section [acl.groups] 2010-05-06 15:14:40 -03:00
Elifarley Callado Coelho Cruz
1b50176554 acl: support for group definitions in section [acl.groups], which take precedence over OS-level groups 2010-05-06 14:23:14 -03:00
Martin Geisler
fa236c2f0a acl: more consistent docstring 2010-05-05 09:25:09 +02:00
Martin Geisler
648fca8526 acl: fix reST syntax 2010-05-05 09:18:05 +02:00
Elifarley Callado Coelho Cruz
e8298826aa acl: add support for branch-based access control 2010-05-04 08:37:20 -03:00
Martin Geisler
862a4d2cfc acl: cleanup module docstring
- removed implementation detail about how the group information is
  obtained

- fixed some language, better consistency

- fixed bad comment in hgrc example
2010-05-01 14:32:50 +02:00
Martin Geisler
3e011e6691 acl: fix ReST syntax in docstring 2010-05-01 14:20:17 +02:00
Elifarley Callado Coelho Cruz
2db63d3c8b acl: updated doc string to reflect recent changes 2010-04-27 19:02:11 -03:00
Elifarley Callado Coelho Cruz
7a60d978ee acl: add support for OS-level groups using @group syntax 2010-04-26 10:55:57 -03:00
Elifarley Callado Coelho Cruz
060edfe5fe Added support for 'pretxncommit', so that one can call the ACL hook at
pre-commit time too. This is useful because now it's possible to avoid
violating ACL permissions much sooner, at commit time, instead of
waiting for a PUSH to check if there were any invalid commits.
2010-04-06 22:15:43 -03:00
Elifarley Callado Coelho Cruz
43acaba36c Added support for 'everybody ' (using an asterisk) in user list. 2010-03-29 09:15:08 -03:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
70de345b15 hgext: enable extensions without "hgext." prefix in help texts 2009-12-22 00:50:03 +01:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Martin Geisler
bed7919bb4 acl: wrap docstrings at 70 characters 2009-07-26 01:37:17 +02:00
Martin Geisler
1bc6f1fdf9 acl: use reST syntax for literal blocks 2009-07-23 00:01:24 +02:00
Martin Geisler
e6d99f707b acl: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Henrik Stuart
77301ebe8e acl: read correct index into url for username (issue298)
The index was inadvertedly off-by-one causing the username to be the
remote host rather than the remote user when hosted in a http(s)
session.
2009-07-02 19:53:20 +02:00
Dirkjan Ochtman
c8e6583765 extensions: change descriptions for hook-providing extensions
Thanks to timeless and Dave Townsend for advice!
2009-06-24 13:42:34 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Cédric Duval
d99e4e75eb acl: help improvements
Thanks to timeless for the review.
2009-06-22 14:49:07 +02:00
Dirkjan Ochtman
a774ff01bc help: add/fix docstrings for a bunch of extensions 2009-06-21 16:45:47 +02:00
Henrik Stuart
b843569ec5 acl: support for getting authenticated user from web server (issue298)
Previously, the acl extension just read the current system user, which
is fine for direct file system access and SSH, but will not work for
HTTP(S) as that would return the web server process user identity
rather than the authenticated user. An empty user is returned if the
user is not authenticated.
2009-06-07 20:31:38 +02:00
Matt Mackall
e802acf0e9 match: remove match.never
Only one user, can be translated to match.exact()
2009-05-31 17:54:18 -05:00
Matt Mackall
89c18ad8ce match: add some default args 2009-05-24 02:56:14 -05:00
Matt Mackall
532c58d931 match: change all users of util.matcher to match.match 2009-05-24 02:56:14 -05:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
371257fd73 ui: fold readsections into readconfig
readconfig now reads only single files
readconfig takes an optional list of sections
readconfig trusts files we're looking for sections in
2009-04-23 15:40:10 -05:00
Matt Mackall
2791e35714 acl: refactoring
- undo class structure
- make buildmatch return None for no function
- use contexts properly
- simplify check loop
2008-06-27 21:45:16 -05:00
Matt Mackall
bc715be859 add __len__ and __iter__ methods to repo and revlog 2008-06-26 14:35:50 -05:00