I’ve now uploaded my Subversion Configuration Suite (svn-meta) repository to Google Code so that the files are publicly available for anyone to use.
Archive for the ‘Contribution’ Category
There are plenty of resources concerning C++ coding style, or coding style more generally.
Here I describe some of my own programming style preferences that I have not seen described elsewhere.
In this post I introduce some new functions:
Suppose that you have an XML file that you wish to examine in detail. You can load that into a browser, and even collapse and expand nodes at will. Here is an XSLT stylesheet that can be used to do something similar, but with custom highlighting.
When you type a comment or a description (which is “comment 0″) for a bug in Bugzilla, certain phrases are treated as special.
For example, the word “bug” followed by a space and then a decimal number is converted into a link to another bug. Therefore, rather than saying
See also bugs 1234 and 2345.
you could instead say
See also bug 1234 and bug 2345.
and the links will be formed by “autolinkification”—you will only see the links after you click the [commit] button.
For more information, see the Bugzilla help topic.
There are occasions when you want a file to be available under version control, but you don’t want changes to it to be committed accidentally. The file might be an example configuration file that will need to be edited differently for different tests, or different machines or for using a program in different ways.
If you have files in your working copy that you want to ignore, but they’re not of one of the ignored types in the SVN <config> file in <C:Documents and SettingsusernameApplication DataSubversion> (on Micro$oft Windoze) and are specific to you and therefore not appropriate for the <svn:ignore> property either, what can you do?
One possibility is to add two more entries to the <config> file thus:
[miscellany] global-ignores = *__.* *__
Then, if you have a file (or directory) in your working copy that you wish to keep, but not to version control, just bung a couple of underscores in the filename at the end or before a dot.
myfile.txt ~> myfile__.txt output ~> output__
A couple of underscores near the end of the filename is my preference (either before or after the extension). You might prefer an alternative scheme.
(One alternative scheme is to have underscores at the start of the filename. However, that also has the effect of moving the filenames to the start of a listing, which may not always be desirable.)