Background info: see the tools-discuss e-mail thread at:
http://www.mail-archive.com/tools-discuss@opensolaris.org/msg03786.html

Goals:
A. Implement an informal registry of information tracking systems.
B. Update webrev.sh to make use of the new registry.
C. Allow users of SAC, Bugster, and defect.opensolaris.org databases to get webrev cross referencing with no special options or configuration. D. Allow on-SWAN and off-SWAN users to get the appropriate cross references using the existing -O ("OpenSolaris mode") switch to webrev. E. Provide mechanism for users of other systems to tailor webrev cross referencing behavior to suit their needs.

The registry of information tracking systems is exactly as initially described in the e-mail thread above.

The webrev.sh script has been updated to read two files: its.reg and its.pri. These are reasonably well documented through comments, and contain, respectively, the registry and priority of different information tracking systems.

For each of these files in turn, we look in the following locations, and take the first thing we find:

        1. location specified via explicit command line option
        2. ~/.its.{reg|pri}
        3. $(whence webrev)/../etc/its.{reg|pri}

As a courtesy, if we use location 1 or 2, we print the location onto stderr.

For each comment line, if it begins with a valid prefix from its.reg, that translation will be used exclusively. Otherwise, those for the systems in its.pri will be applied in order.

The use of URL-related environment variables has been eliminated in webrev. Users are instead encouraged to register their own systems in its.reg, and I'm happy to sponsor integrations to accomplish that.

Anyway, hopefully the code and some test examples will clarify:

The actual webrev:
http://cr.opensolaris.org/~mjnelson/webrev.its/
In addition to code review comments, I also welcome requests to include additional systems of record with the initial integration.

On- and off-SWAN versions of a test webrev:
http://cr.opensolaris.org/~mjnelson/webrev.its.on-swan/
http://cr.opensolaris.org/~mjnelson/webrev.its.off-swan/
These were both generated using the default its.pri, which consists of "sun arc doo." They also serve to illustrate a potential pitfall with the regular expression space: if you don't specify a prefix, you get the default translations. So you need to prioritize carefully, with longer integers preceding shorter ones (ie "sun" before "doo"), and you cannot mix systems with overlapping spaces (ie "doo" and "bgc").

A webrev using different its.reg and its.pri files. I arbitrarily used on-SWAN URLs here. The key parts were that (a) it found the right files, (b) it noted their use on stderr, (c) explicitly tagged references remained unchanged, and (d) implicit references resolved to different systems:
http://cr.opensolaris.org/~mjnelson/webrev.its.rcfiles/

--Mark
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to