diff options
author | Torgny Nyblom <nyblom@kde.org> | 2012-11-23 15:55:26 +0100 |
---|---|---|
committer | Torgny Nyblom <nyblom@kde.org> | 2012-11-23 15:55:26 +0100 |
commit | c9376cfbe605a5bad26b76d113f9060d5cdf8753 (patch) | |
tree | 20a79fbe0121efb0f1cc8fe4957a6ef403a0da47 /src/main.cpp | |
parent | 2baedda2b06277544e3356670fd03e7e020d2abc (diff) | |
parent | 8f8d4c770ac4884dc6c7909a342b27b28f23cbd9 (diff) | |
download | svn2git-c9376cfbe605a5bad26b76d113f9060d5cdf8753.tar svn2git-c9376cfbe605a5bad26b76d113f9060d5cdf8753.tar.gz svn2git-c9376cfbe605a5bad26b76d113f9060d5cdf8753.tar.bz2 svn2git-c9376cfbe605a5bad26b76d113f9060d5cdf8753.tar.xz svn2git-c9376cfbe605a5bad26b76d113f9060d5cdf8753.zip |
Merge commit 'refs/merge-requests/20' of gitorious.org:svn2git/svn2git into mr/20
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 681824f..ec969c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -127,6 +127,7 @@ QSet<int> loadRevisionsFile( const QString &fileName, Svn &svn ) static const CommandLineOption options[] = { {"--identity-map FILENAME", "provide map between svn username and email"}, + {"--identity-domain DOMAIN", "provide user domain if no map was given"}, {"--revisions-file FILENAME", "provide a file with revision number that should be processed"}, {"--rules FILENAME[,FILENAME]", "the rules file(s) that determines what goes where"}, {"--add-metadata", "if passed, each git commit will have svn commit info"}, @@ -178,9 +179,9 @@ int main(int argc, char **argv) out << "svn-all-fast-export failed: please specify the rules using the 'rules' argument\n"; return 11; } - if (!args->contains("identity-map")) { + if (!args->contains("identity-map") && !args->contains("identity-domain")) { QTextStream out(stderr); - out << "WARNING; no identity-map specified, all commits will be without email address\n\n"; + out << "WARNING; no identity-map or -domain specified, all commits will use default @localhost email address\n\n"; } QCoreApplication app(argc, argv); @@ -246,6 +247,11 @@ int main(int argc, char **argv) svn.setMatchRules(rulesList.allMatchRules()); svn.setRepositories(repositories); svn.setIdentityMap(loadIdentityMapFile(args->optionArgument("identity-map"))); + // Massage user input a little, no guarantees that input makes sense. + QString domain = args->optionArgument("identity-domain").simplified().remove(QChar('@')); + if (domain.isEmpty()) + domain = QString("localhost"); + svn.setIdentityDomain(domain); if (max_rev < 1) max_rev = svn.youngestRevision(); |