From 95ac50d6ecafa8a318c8aa278ab2ef1d04277dd1 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Thu, 29 Apr 2010 20:48:17 +0200 Subject: Split into two rows. --- src/svn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/svn.cpp') diff --git a/src/svn.cpp b/src/svn.cpp index 0c859c9..7babe31 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -216,7 +216,8 @@ static void splitPathName(const Rules::Match &rule, const QString &pathName, QSt } if (path_p) { - QString prefix = svnprefix.replace(rule.rx, rule.prefix); + QString prefix = svnprefix; + prefix.replace(rule.rx, rule.prefix); *path_p = prefix + pathName.mid(svnprefix.length()); } } -- cgit v1.2.1 From 64a45f529c6e3e08b2ddbb1b23870d89a3a62cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Mon, 19 Apr 2010 23:06:00 +0200 Subject: Implement the replace node changeset which exists from some repositories namely the FreeBSD svn rep --- src/svn.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/svn.cpp') diff --git a/src/svn.cpp b/src/svn.cpp index 7babe31..0e7a1b7 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -509,15 +509,31 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change_t *change svn_boolean_t is_dir; SVN_ERR(svn_fs_is_dir(&is_dir, fs_root, key, revpool)); if (is_dir) { - if (path_from == NULL) { - // no, it's a new directory being added + if (change->change_kind == svn_fs_path_change_modify || + change->change_kind == svn_fs_path_change_add) { + if (path_from == NULL) { + // freshly added directory, or modified properties // Git doesn't handle directories, so we don't either //qDebug() << " mkdir ignored:" << key; return EXIT_SUCCESS; - } + } - current += '/'; - qDebug() << " " << key << "was copied from" << path_from << "rev" << rev_from; + current += '/'; + qDebug() << " " << key << "was copied from" << path_from << "rev" << rev_from; + } else if (change->change_kind == svn_fs_path_change_delete) { + qDebug() << " " << key << "was deleted"; + } else if (change->change_kind == svn_fs_path_change_replace) { + if (path_from == NULL) + qDebug() << " " << key << "was replaced"; + else + qDebug() << " " << key << "was replaced from" << path_from << "rev" << rev_from; + } else if (change->change_kind == svn_fs_path_change_reset) { + qCritical() << " " << key << "was reset, panic!"; + return EXIT_FAILURE; + } else { + qCritical() << " " << key << "has unhandled change kind " << change->change_kind << ", panic!"; + return EXIT_FAILURE; + } } // find the first rule that matches this pathname @@ -647,6 +663,8 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha transactions.insert(repository + branch, txn); } + if (change->change_kind == svn_fs_path_change_replace && path_from == NULL) + txn->deleteFile(path); if (change->change_kind == svn_fs_path_change_delete) { txn->deleteFile(path); } else if (!current.endsWith('/')) { -- cgit v1.2.1 From 80d1c990170ac8771da9607cdcf498f57996a949 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Mon, 3 May 2010 20:07:04 +0200 Subject: Fix svn.replace --- src/svn.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/svn.cpp') diff --git a/src/svn.cpp b/src/svn.cpp index 0e7a1b7..bb00214 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -509,16 +509,16 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change_t *change svn_boolean_t is_dir; SVN_ERR(svn_fs_is_dir(&is_dir, fs_root, key, revpool)); if (is_dir) { + current += '/'; if (change->change_kind == svn_fs_path_change_modify || change->change_kind == svn_fs_path_change_add) { if (path_from == NULL) { - // freshly added directory, or modified properties - // Git doesn't handle directories, so we don't either - //qDebug() << " mkdir ignored:" << key; - return EXIT_SUCCESS; + // freshly added directory, or modified properties + // Git doesn't handle directories, so we don't either + //qDebug() << " mkdir ignored:" << key; + return EXIT_SUCCESS; } - current += '/'; qDebug() << " " << key << "was copied from" << path_from << "rev" << rev_from; } else if (change->change_kind == svn_fs_path_change_delete) { qDebug() << " " << key << "was deleted"; -- cgit v1.2.1