[openstack-dev] Searching for docs reviews in Gerrit

Anne Gentle anne at openstack.org
Sat May 17 03:03:38 UTC 2014


A great question came out of a docs session today and I wanted to post this
hint/tip here, and also ask a question.

Gerrit has documentation that describes how to use regular expressions to
search for specific reviews. See
https://review.openstack.org/Documentation/user-search.html

One that I've found handy for docs reviews is:
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 usefile:^.*\.xml$. The dk.brics.automaton
library<http://www.brics.dk/automaton/> 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 anchoring the
match to the start of the string. To match all Java files, use
file:^.*\.java.

The entire regular expression pattern, including the ^ character, should be
double quoted when using more complex construction (like ones using a
bracket expression). For example, to match all XML files named like
*name1.xml*, *name2.xml*, and *name3.xml* use file:"^name[1-3].xml".


For example, if you want to review all RST files that are edited in a repo,
log into review.openstack.org, then go to Settings > Watched Projects.
Then, on a particular project's repo, look for file:^.*\.rst.

One example I'd like to know about -- is it possible to watch all changes
to the Networking chapter in the Cloud Admin Guide in the
openstack/openstack-manuals repo? This particular search didn't work for me:

file:"section_networking-adv-config.xml" project:openstack/openstack-manuals

nor does:
file:"docs/admin-guide-cloud/networking/section_networking-adv-config.xml"
project:openstack/openstack-manuals

Any more ideas for focusing on doc reviews in specialty areas?
Thanks,
Anne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140516/dd6c4e9d/attachment.html>


More information about the OpenStack-dev mailing list