diff options
author | Ulrich Spörlein <uqs@spoerlein.net> | 2010-09-28 22:01:29 +0200 |
---|---|---|
committer | Ulrich Spörlein <uqs@spoerlein.net> | 2012-05-11 15:48:21 +0200 |
commit | 2ae83eb1c5f9b4560e3fa808cb883829c7973a4a (patch) | |
tree | 028b20bf0fd5d7a2a1dc388741fa1ec831a89fce /src/svn.cpp | |
parent | 371abece8cbaf9d0c396c3ab8d4fdd1ab2718e7d (diff) | |
download | svn2git-2ae83eb1c5f9b4560e3fa808cb883829c7973a4a.tar svn2git-2ae83eb1c5f9b4560e3fa808cb883829c7973a4a.tar.gz svn2git-2ae83eb1c5f9b4560e3fa808cb883829c7973a4a.tar.bz2 svn2git-2ae83eb1c5f9b4560e3fa808cb883829c7973a4a.tar.xz svn2git-2ae83eb1c5f9b4560e3fa808cb883829c7973a4a.zip |
Allow user-overriding of default email domain
Lazy projects where svn user X has email X@project.org don't need to
compile (and update) an identity-map for rolling conversions.
This can be mixed with a real identity-map, so only misses in the map
will have the user then show up as X@project.org
Also change the defaults somewhat. I don't like the NFS reserved
username nobody to show up in SVN or git logs, but am keeping that for
now.
Diffstat (limited to 'src/svn.cpp')
-rw-r--r-- | src/svn.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/svn.cpp b/src/svn.cpp index c103728..92c8abf 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -79,6 +79,7 @@ public: QList<MatchRuleList> allMatchRules; RepositoryHash repositories; IdentityHash identities; + QString userdomain; SvnPrivate(const QString &pathToRepository); ~SvnPrivate(); @@ -130,6 +131,11 @@ void Svn::setIdentityMap(const IdentityHash &identityMap) d->identities = identityMap; } +void Svn::setIdentityDomain(const QString &identityDomain) +{ + d->userdomain = identityDomain; +} + int Svn::youngestRevision() { return d->youngestRevision(); @@ -388,6 +394,7 @@ public: QList<MatchRuleList> allMatchRules; RepositoryHash repositories; IdentityHash identities; + QString userdomain; svn_fs_t *fs; svn_fs_root_t *fs_root; @@ -436,6 +443,7 @@ int SvnPrivate::exportRevision(int revnum) rev.allMatchRules = allMatchRules; rev.repositories = repositories; rev.identities = identities; + rev.userdomain = userdomain; // open this revision: printf("Exporting revision %d ", revnum); @@ -506,8 +514,8 @@ int SvnRevision::fetchRevProps() if (!svnauthor || svn_string_isempty(svnauthor)) authorident = "nobody <nobody@localhost>"; else - authorident = svnauthor->data + QByteArray(" <") + - svnauthor->data + QByteArray("@localhost>"); + authorident = svnauthor->data + QByteArray(" <") + svnauthor->data + + QByteArray("@") + userdomain.toUtf8() + QByteArray(">"); } propsFetched = true; return EXIT_SUCCESS; |