diff options
author | Torgny Nyblom <kde@nyblom.org> | 2010-03-25 19:28:09 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-03-25 19:28:09 +0100 |
commit | 7ee1b3be6caa2745b723ad9364b81a5153cec1b1 (patch) | |
tree | a5b5c515367a8df77f5ea673a3e8b26fa9e216eb /src | |
parent | c9c52bc1415082f39738c402317a25c6991f8369 (diff) | |
download | svn2git-7ee1b3be6caa2745b723ad9364b81a5153cec1b1.tar svn2git-7ee1b3be6caa2745b723ad9364b81a5153cec1b1.tar.gz svn2git-7ee1b3be6caa2745b723ad9364b81a5153cec1b1.tar.bz2 svn2git-7ee1b3be6caa2745b723ad9364b81a5153cec1b1.tar.xz svn2git-7ee1b3be6caa2745b723ad9364b81a5153cec1b1.zip |
Add command line option to print what rules are used on each file.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | src/svn.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4032b71..2e92a32 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,6 +61,7 @@ static const CommandLineOption options[] = { {"--resume-from revision", "start importing at svn revision number"}, {"--max-rev revision", "stop importing at svn revision number"}, {"--dry-run", "don't actually write anything"}, + {"--debug-rules", "print what rule is being used for each file"}, {"--commit-interval NUMBER", "if passed the cache will be flushed to git every NUMBER of commits"}, {"-h, --help", "show help"}, {"-v, --version", "show version"}, diff --git a/src/svn.cpp b/src/svn.cpp index ba15a2c..5f3dc28 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -550,6 +550,8 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change_t *cha apr_hash_t *changes, const QString ¤t, const Rules::Match &rule, apr_pool_t *pool) { + if(CommandLineParser::instance()->contains( QLatin1String("debug-rules"))) + qDebug() << " " << qPrintable(current) << "matched rule:" << rule.lineNumber << "(" << rule.rx.pattern() << ")"; switch (rule.action) { case Rules::Match::Ignore: // ignore rule |