I have files with a lot of macros which I want to replace with C++ code with templates.
In doing so, I'll have to change code like this
#define stuff_to_do (x) \
do_some_stuff_##x( ); \
do_some_more_stuff( x );
into
template <class T>
void stuff_to_do( T x ) {
do_some_stuff<T>();
do_some_more_stuff();
}
i.e. change tabs/spaces, and escape characters, and small insertions (like <T>
) here and there.
It is important, however, that the annotations can point to the programmer who did the changes before this.
hg annotate has some options for this:
--skip <REV[+]>
revision to not display (EXPERIMENTAL)
-w, --ignore-all-space
ignore white space when comparing lines
-b, --ignore-space-change
ignore changes in the amount of white space
-B, --ignore-blank-lines
ignore changes whose lines are all blank
-Z, --ignore-space-at-eol
ignore changes in whitespace at EOL
-I, --include <PATTERN[+]>
include names matching the given patterns
-X, --exclude <PATTERN[+]>
exclude names matching the given patterns
The experimental --skip
option was added in Mercurial 4.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With