SubWCRev - A Working Copy Status Tool for Git ------------------------------------------------------ SubWCRev is Windows console program which can be used to read the status of a Git working copy and optionally perform keyword substitution in a template file. usage: SubWCRev WorkingCopyPath [SrcVersionFile DstVersionFile] [-nmdfe] Params: WorkingCopyPath : path to a Git working copy. SrcVersionFile : path to a template header file containing keywords. DstVersionFile : path to save the resulting parsed file. -n : if given, then SubWCRev will error if the working copy contains local modifications. -m : if given, then SubWCRev will error if the working copy contains mixed revisions. -d : if given, then SubWCRev will only do its job if DstVersionFile does not exist. -f : if given, then SubWCRev will include the last-changed revision of folders. Default is to use only files to get the revision numbers. This only affects $WCREV$ and $WCDATE$ -e : if given, also include dirs which are included with svn:externals, but only if they are from the same repository. Switches must be given in a single argument, eg. '-nm' not '-n -m'. SubWCRev reads the Git status of all files in a working copy, excluding externals. It records the highest commit revision number found, and the commit timestamp of that revision, and also whether there are local modifications in the working copy, or mixed update revisions. The revision number, update revision range and modification status are displayed on stdout. If a source and destination files are supplied, SubWCRev copies source to destination, performing keyword substitution as follows: $WCREV$ is replaced with the highest commit revision in the working copy. $WCDATE$ is replaced with the commit date/time of that revision in international format, ie. yyyy-mm-dd hh:mm:ss $WCNOW$ is replaced with the current date/time in international format. $WCRANGE$ is replaced with the update revision range in the working copy. If the working copy is in a consistent state, this will be a single revision. If the working copy contains mixed revisions, either due to being out of date, or due to a deliberate update-to-revision, then the range will be shown in the form 100:200 $WCMIXED?TrueText:FalseText$ is replaced with TrueText if there are mixed update revisions, or FalseText if not. $WCMODS?TrueText:FalseText$ is replaced with TrueText if there are local modifications, or FalseText if not. $WCURL$ is replaced with the repository URL of the working copy path passed to SubWCRev. Finally, an optional switch may be added to abort SubWCRev if certain conditions are not met. The -n switch causes SubWCRev to abort with ERRORLEVEL 7 if there are any local modifications. The -m switch causes SubWCRev to abort with ERRORLEVEL 8 if there are mixed update revisions. The -d switch causes SubWCRev to abort with ERRORLEVEL 9 if the destination file already exists. ------------------------------------------------------------------------------- SubWCRev was written by Stefan Küng for the TortoiseGit project. Visit our website at http://TortoiseGit.tigris.org -------------------------------------------------------------------------------