diff options
author | Thiago Macieira <thiago@cassini.local.lan> | 2007-12-24 10:48:00 -0200 |
---|---|---|
committer | Thiago Macieira <thiago@cassini.local.lan> | 2007-12-24 10:48:00 -0200 |
commit | 1228bd7c87f4e203883086d6884280653a8d1777 (patch) | |
tree | 659996b6c17d520e07ee4362307a0711d8745562 /src/main.cpp | |
parent | 14ddd2a51aa3a917bbb7fbade842818ab09802bc (diff) | |
download | svn2git-1228bd7c87f4e203883086d6884280653a8d1777.tar svn2git-1228bd7c87f4e203883086d6884280653a8d1777.tar.gz svn2git-1228bd7c87f4e203883086d6884280653a8d1777.tar.bz2 svn2git-1228bd7c87f4e203883086d6884280653a8d1777.tar.xz svn2git-1228bd7c87f4e203883086d6884280653a8d1777.zip |
Add a better option-parser
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4415bca..a8f4069 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,6 +20,7 @@ #include <stdio.h> +#include "options.h" #include "ruleparser.h" #include "repository.h" #include "svn.h" @@ -28,14 +29,11 @@ int main(int argc, char **argv) { QCoreApplication app(argc, argv); - QStringList arguments = app.arguments(); - if (arguments.count() < 3) { - printf("Usage: svn-all-fast-export configfile path-to-svn\n"); - return 0; - } + Options options; + options.parseArguments(app.arguments()); // Load the configuration - Rules rules(arguments.at(1)); + Rules rules(options.ruleFile); rules.load(); // create the repository list @@ -44,7 +42,7 @@ int main(int argc, char **argv) repositories.insert(rule.name, new Repository(rule)); Svn::initialize(); - Svn svn(arguments.at(2)); + Svn svn(options.pathToRepository); svn.setMatchRules(rules.matchRules()); svn.setRepositories(repositories); |