summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Bäck <magnus.back@sonyericsson.com>2011-02-02 08:57:15 +0100
committerUlrik Sjölin <ulrik.sjolin@sonyericsson.com>2011-05-19 10:54:39 -0700
commite56118329b14fe9ca824ccf7fb406582fc5b4055 (patch)
tree708b635f4eec7ce54c908a715ae5007a18fcbc1b
parent528c3de81f90c43dffd7be573c8a1c15941064ce (diff)
Documenting when different regexp libraries are used
The documentation hasn't been clear on which regular expression implementations were used when e.g. interpreting different configuration variables. In trivial cases this doesn't matter as most regular expression metacharacters are widely supported, but for complex expressions it can be beneficial to know. Change-Id: I2a479aba68779cf857dac9999bc4a90ac2685838
-rw-r--r--Documentation/access-control.txt4
-rw-r--r--Documentation/config-gerrit.txt18
-rw-r--r--Documentation/config-sso.txt6
-rw-r--r--Documentation/user-search.txt19
4 files changed, 35 insertions, 12 deletions
diff --git a/Documentation/access-control.txt b/Documentation/access-control.txt
index 20fe52dcab..7f5cd4448e 100644
--- a/Documentation/access-control.txt
+++ b/Documentation/access-control.txt
@@ -155,6 +155,10 @@ by prefixing the reference name with `\^`. For example
`\^refs/heads/[a-z]\{1,8\}` matches all lower case branch names
between 1 and 8 characters long. Within a regular expression `.`
is a wildcard matching any character, but may be escaped as `\.`.
+The link:http://www.brics.dk/automaton/[dk.brics.automaton library]
+is used for evaluation of regular expression access control
+rules. See the library documentation for details on this
+particular regular expression flavor.
References can have the current user name automatically included,
creating dynamic access controls that change to match the currently
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 11bba6e93a..93bed415ad 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -115,7 +115,9 @@ List of permitted OpenID providers. A user may only authenticate
with an OpenID that matches this list. Only used if `auth.type`
was set to OpenID (the default).
+
-Patterns may be either a regular expression (start with `^` and
+Patterns may be either a
+link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
+Java regular expression (java.util.regex)] (start with `^` and
end with `$`) or be a simple prefix (any other string).
+
By default, the list contains two values, `http://` and `https://`,
@@ -131,7 +133,9 @@ granted to the `Anonymous Users` and `Registered Users` groups,
the user account must only have OpenIDs which match at least one
pattern from this list.
+
-Patterns may be either a regular expression (start with `^` and
+Patterns may be either a
+link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
+Java regular expression (java.util.regex)] (start with `^` and
end with `$`) or be a simple prefix (any other string).
+
By default, the list contains two values, `http://` and `https://`,
@@ -1831,10 +1835,12 @@ Several trakingid entries can have the same footer tag.
[[trackingid.name.match]]trackingid.<name>.match::
+
-A regular expression used to match the external tracking id part of the
-footer line. The match can result in several entries in the DB.
-If grouping is used in the regex the first group will be interpreted
-as the tracking id. Tracking ids > 20 char will be ignored.
+A link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
+Java regular expression (java.util.regex)] used to match the
+external tracking id part of the footer line. The match can
+result in several entries in the DB. If grouping is used in the
+regex the first group will be interpreted as the tracking id.
+Tracking ids > 20 char will be ignored.
+
The configuration file parser eats one level of backslashes, so the
character class `\s` requires `\\s` in the configuration file. The
diff --git a/Documentation/config-sso.txt b/Documentation/config-sso.txt
index 064c4ddda0..37f5b05a3e 100644
--- a/Documentation/config-sso.txt
+++ b/Documentation/config-sso.txt
@@ -34,8 +34,10 @@ In order to use permissions beyond those granted to the
`Anonymous Users` and `Registered Users` groups, an account
must only have OpenIDs which match at least one pattern from the
`auth.trustedOpenID` list in `gerrit.config`. Patterns may be
-either a regular expression (must start with `^` and end with `$`)
-or be a simple prefix (any other string).
+either a
+link:http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[standard
+Java regular expression (java.util.regex)] (must start with `^`
+and end with `$`) or be a simple prefix (any other string).
Out of the box Gerrit is configured to trust two patterns, which
will match any OpenID provider on the Internet:
diff --git a/Documentation/user-search.txt b/Documentation/user-search.txt
index 72d60ac4e2..ba031dbb9a 100644
--- a/Documentation/user-search.txt
+++ b/Documentation/user-search.txt
@@ -101,7 +101,10 @@ Changes where 'SHA1' is one of the patch sets of the change.
project:'PROJECT'::
+
Changes occuring in 'PROJECT'. If 'PROJECT' starts with `^` it
-matches project names by regular expression.
+matches project names by regular expression. The
+link:http://www.brics.dk/automaton/[dk.brics.automaton
+library] is used for evaluation of such patterns.
+
[[branch]]
branch:'BRANCH'::
@@ -114,7 +117,9 @@ for 'branch:refs/heads/master' is the same as searching for
'ref:refs/heads/refs/heads/master'.
+
If 'BRANCH' starts with `^` it matches branch names by regular
-expression patterns.
+expression patterns. The
+link:http://www.brics.dk/automaton/[dk.brics.automaton
+library] is used for evaluation of such patterns.
[[topic]]
topic:'TOPIC'::
@@ -124,7 +129,9 @@ often combined with 'branch:' and 'project:' operators to select
all related changes in a series.
+
If 'TOPIC' starts with `^` it matches topic names by regular
-expression patterns.
+expression patterns. The
+link:http://www.brics.dk/automaton/[dk.brics.automaton
+library] is used for evaluation of such patterns.
[[ref]]
ref:'REF'::
@@ -134,7 +141,9 @@ name. Since 'REF' is absolute from the top of the repository it
must start with 'refs/'.
+
If 'REF' starts with `^` it matches reference names by regular
-expression patterns.
+expression patterns. The
+link:http://www.brics.dk/automaton/[dk.brics.automaton
+library] is used for evaluation of such patterns.
[[tr,bug]]
tr:'ID', bug:'ID'::
@@ -164,6 +173,8 @@ file:^'REGEX'::
Matches any change where REGEX matches a file that was affected
by the change. The regular expression pattern must start with
`^`. For example, to match all XML files use `file:^.*\.xml$`.
+The link:http://www.brics.dk/automaton/[dk.brics.automaton
+library] is used for the evaluation of such patterns.
+
The `^` required at the beginning of the regular expression not only
denotes a regular expression, but it also has the usual meaning of