From 2ae83eb1c5f9b4560e3fa808cb883829c7973a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Tue, 28 Sep 2010 22:01:29 +0200 Subject: 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. --- src/svn.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/svn.cpp') 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 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 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 "; else - authorident = svnauthor->data + QByteArray(" <") + - svnauthor->data + QByteArray("@localhost>"); + authorident = svnauthor->data + QByteArray(" <") + svnauthor->data + + QByteArray("@") + userdomain.toUtf8() + QByteArray(">"); } propsFetched = true; return EXIT_SUCCESS; -- cgit v1.2.1 From c0187417902b10698135727d911ab9018f4941eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Wed, 19 Sep 2012 21:59:35 +0200 Subject: Remove the branch copy heuristic The FreeBSD project has a different approach to branches than the standard SVN or GIT models of how branches should work. An MFC from head/ to stable/8 is a cherry-pick in git and should never result in a merge commit. Sadly, this means that "IFCs" from head/ to project/foo also no longer are merge commits, though they really are ... Reported by: Ryan Stone --- src/svn.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/svn.cpp') diff --git a/src/svn.cpp b/src/svn.cpp index 92c8abf..0c28cf2 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -779,18 +779,6 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha transactions.insert(repository + branch, txn); } - // - // If this path was copied from elsewhere, use it to infer _some_ - // merge points. This heuristic is fairly useful for tracking - // changes across directory re-organizations and wholesale branch - // imports. - // - if (path_from != NULL && prevrepository == repository && prevbranch != branch) { - if(ruledebug) - qDebug() << "copy from branch" << prevbranch << "to branch" << branch << "@rev" << rev_from; - txn->noteCopyFromBranch (prevbranch, rev_from); - } - if (change->change_kind == svn_fs_path_change_replace && path_from == NULL) { if(ruledebug) qDebug() << "replaced with empty path (" << branch << path << ")"; -- cgit v1.2.1