Skip to content

Commit d4ff0b2

Browse files
committed
Merge pull request #4 from neverpanic/master
svn.cpp: Do not call svn_fs_copied_from on delete
2 parents 268b22f + 958dcec commit d4ff0b2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/svn.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,13 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change_t *change
568568
QString current = QString::fromUtf8(key);
569569

570570
// was this copied from somewhere?
571-
svn_revnum_t rev_from;
572-
const char *path_from;
573-
SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool));
571+
svn_revnum_t rev_from = SVN_INVALID_REVNUM;
572+
const char *path_from = NULL;
573+
if (change->change_kind != svn_fs_path_change_delete) {
574+
// svn_fs_copied_from would fail on deleted paths, because the path
575+
// obviously no longer exists in the current revision
576+
SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool));
577+
}
574578

575579
// is this a directory?
576580
svn_boolean_t is_dir;

0 commit comments

Comments
 (0)