From 7ee1b3be6caa2745b723ad9364b81a5153cec1b1 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Thu, 25 Mar 2010 19:28:09 +0100 Subject: Add command line option to print what rules are used on each file. --- src/main.cpp | 1 + src/svn.cpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src') 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 -- cgit v1.2.1