aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2010-12-16 09:50:31 +0100
committerTorgny Nyblom <kde@nyblom.org>2010-12-16 09:50:31 +0100
commit1760fafad78439a11e2c925623456e5b4b6b9390 (patch)
tree48f62ac60ae5589081d987594c308f320ca006f3
parent432c369a9932b018bac8ffc7c1c0e3675b5ddc6f (diff)
downloadsvn2git-1760fafad78439a11e2c925623456e5b4b6b9390.tar
svn2git-1760fafad78439a11e2c925623456e5b4b6b9390.tar.gz
svn2git-1760fafad78439a11e2c925623456e5b4b6b9390.tar.bz2
svn2git-1760fafad78439a11e2c925623456e5b4b6b9390.tar.xz
svn2git-1760fafad78439a11e2c925623456e5b4b6b9390.zip
Only fetch revision properties once per revision
-rw-r--r--src/svn.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/svn.cpp b/src/svn.cpp
index 7372a16..5a61556 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -392,9 +392,10 @@ public:
QByteArray log;
uint epoch;
bool ruledebug;
+ bool propsFetched;
SvnRevision(int revision, svn_fs_t *f, apr_pool_t *parent_pool)
- : pool(parent_pool), fs(f), fs_root(0), revnum(revision)
+ : pool(parent_pool), fs(f), fs_root(0), revnum(revision), propsFetched(false)
{
ruledebug = CommandLineParser::instance()->contains( QLatin1String("debug-rules"));
}
@@ -482,6 +483,9 @@ int SvnRevision::prepareTransactions()
int SvnRevision::fetchRevProps()
{
+ if( propsFetched )
+ return EXIT_SUCCESS;
+
apr_hash_t *revprops;
SVN_ERR(svn_fs_revision_proplist(&revprops, fs, revnum, pool));
svn_string_t *svnauthor = (svn_string_t*)apr_hash_get(revprops, "svn:author", APR_HASH_KEY_STRING);
@@ -498,6 +502,7 @@ int SvnRevision::fetchRevProps()
authorident = svnauthor->data + QByteArray(" <") +
svnauthor->data + QByteArray("@localhost>");
}
+ propsFetched = true;
return EXIT_SUCCESS;
}