diff options
author | Thiago Macieira <thiago@cassini.local.lan> | 2007-12-24 14:05:34 -0200 |
---|---|---|
committer | Thiago Macieira <thiago@cassini.local.lan> | 2007-12-24 14:05:34 -0200 |
commit | 61ae76bdcac1746db955100df02ff5bd8db0c774 (patch) | |
tree | dc9a107b163a692aed8bf912c3732b16a9fe0cc1 | |
parent | 453ea6b649151fee4c567b860029b455dca49cd8 (diff) | |
download | svn2git-61ae76bdcac1746db955100df02ff5bd8db0c774.tar svn2git-61ae76bdcac1746db955100df02ff5bd8db0c774.tar.gz svn2git-61ae76bdcac1746db955100df02ff5bd8db0c774.tar.bz2 svn2git-61ae76bdcac1746db955100df02ff5bd8db0c774.tar.xz svn2git-61ae76bdcac1746db955100df02ff5bd8db0c774.zip |
Support an upper limit of revision numbers
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/options.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2ce11c5..bf7af76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ int main(int argc, char **argv) rules.load(); int min_rev = options.options.value("resume-from").toInt(); + int max_rev = options.options.value("max-rev").toInt(); if (min_rev < 1) min_rev = 1; @@ -54,7 +55,8 @@ int main(int argc, char **argv) svn.setMatchRules(rules.matchRules()); svn.setRepositories(repositories); - int max_rev = svn.youngestRevision(); + if (max_rev < 1) + max_rev = svn.youngestRevision(); for (int i = min_rev; i <= max_rev; ++i) if (!svn.exportRevision(i)) break; diff --git a/src/options.cpp b/src/options.cpp index aeff12a..0de8625 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -45,7 +45,7 @@ void Options::parseArguments(const QStringList &argumentList) validOptions << "help"; QSet<QString> validOptionsWithComplement; - validOptionsWithComplement << "resume-from" << "identity-map"; + validOptionsWithComplement << "resume-from" << "max-rev" << "identity-map"; QStringList arguments = argumentList; arguments.takeFirst(); // the first one is the executable name; drop it |