This version of webrev has been updated to be able to handle both Teamware and Mercurial.
From a usage point of view, it is mostly unchanged. However there are a few differences and improvements that should be pointed out.
So how will it decides whether to use Mercurial or Teamware? There are several ways:
By using a command line option: -t for teamware or -m for
mercurial.
So for instance:
$ webrev -t
Will force webrev
to assume a Teamware workspace. While
$ webrev -m
Will force
it to assume a mercurial worlspace.
If neither -t nor -m is specified, it will check for
environment variables:
if CODEMGR_WS is set and pointing to a
valid Teamware workspace, it will it.
At that point, it will check whether the current directory is under any of the 2 systems. This is achieved by running 'workspace name' for Teamware (if the 'workspace' command can't be found, then the current directory is checked for a 'Codemgr_wsdata' subdirectory) and 'hg root' for Mercurial.
In any cases, webrev will display which tool it is using:
$ webrev
SCM detected: teamware
...
$ webrev -m
SCM
detected: mercurial
The forest extension for mercurial allows operations on trees with nested repositories. If you want webrev to make use of that extension, then use the -f option and point it to the top of the tree.
If no file list is specified, then webrev will try to generate one from the state of the workspace.
For Teamware, it will parse the output of a 'putback -n' command
For Mercurial it will first try to parse the result of 'hg outgoing' (this means you have one or more commit pending). If no commit is pending it will then parse the output of 'hg status'. It is possible to tell webrev to forego the first step (i.e. Ignore all pending commit) by using the -N option.
Other options:
Note: When specifying a remote workspace (using ssh:// or http:// for instance) this is only used when generating the list of modified files. I.E. it determines which parent workspace will be used when issuing 'hg outgoing'.
Other environment variables:
CODEMGR_PARENT: parent workspace location (teamware only).
WDIR: Control the output directory.