< CVS error output visualization

CVS error output visualization

As you learned from the CVS output visualization chapter, the normal CVS output is only textual. This is also true for the error output (output that CVS sends to stderr). A quotation from the standard CVS book "Version Management with CVS" by Per Cederqvist et al says: "...CVS is capable of printing many, many error messages, often with parts of them supplied by the operating system...". This means that CVS error or information messages aren't really easy to understand and to classify, especially for a beginner.

The idea of the MGMAddOn error visualization is to provide a way to classify the messages, write a comment on them and to present this new information to the user. Many systems a similar technology: they have functions taking an error code and returning a description for it. Too bad we don't have error codes (besides 0 and 1) in CVS... So we have to parse the message, compare it with a pre-written one and get the description from a list. What sounds quite simple isn't really because CVS error messages are often unpredictable; they might have a module name included, for example. The solution is to have a template format for a message which would match different actual CVS responses.

MGMAddOn makes use of two technologies here: XML for a list of templates and regular expressions for matching. We describe a CVS response by providing a pattern, a comment and a classification. That's how it looks like:

 

The pattern can include any regular expression which makes this format very powerful and the simple XML format allows easy editing and parsing. The template list can be extended so a kind of "learning" is possible. Here an example how this whole thing looks like in action.

If configured properly, WinCVS will display a response list after a CVS error: