Index: devel/svn2git/Makefile =================================================================== --- devel/svn2git/Makefile +++ devel/svn2git/Makefile @@ -3,6 +3,7 @@ PORTNAME= svn2git DISTVERSION= 1.0.10 +PORTREVISION= 1 CATEGORIES= devel kde MASTER_SITES= LOCAL/dbn/${PORTNAME} @@ -19,17 +20,13 @@ USES= qmake tar:xz USE_QT4= corelib -OPTIONS_DEFINE= FREEBSD_REPO +OPTIONS_DEFINE= FREEBSD_REPO FREEBSD_REPO_DESC= FreeBSD-repo only mode PLIST_FILES= bin/svn2git -.include +FREEBSD_REPO_EXTRA_PATCHES= ${PATCHDIR}/freebsd-export-patch -.if ${PORT_OPTIONS:MFREEBSD_REPO} -EXTRA_PATCHES= ${PATCHDIR}/freebsd-export-patch -.endif - post-patch: ${REINPLACE_CMD} "s|/usr/local|${LOCALBASE}|" ${WRKSRC}/src/src.pro Index: devel/svn2git/files/patch-src__src.pro =================================================================== --- devel/svn2git/files/patch-src__src.pro +++ devel/svn2git/files/patch-src__src.pro @@ -1,6 +1,4 @@ -diff --git a/src/src.pro b/src/src.pro -index da6d40d..5749202 100644 ---- src/src.pro +--- src/src.pro.orig 2013-05-19 06:20:36 UTC +++ src/src.pro @@ -2,11 +2,12 @@ # Automatically generated by qmake (2.01a) dim. dc. 23 13:49:28 2007 @@ -18,7 +16,7 @@ !isEmpty(VERSION){ VERSION = $${VERSION} } -@@ -15,7 +16,7 @@ VERSTR = '\\"$${VERSION}\\"' # place quotes around the version string +@@ -15,7 +16,7 @@ VERSTR = '\\"$${VERSION}\\"' # place qu DEFINES += VER=\"$${VERSTR}\" # create a VER macro containing the version string TEMPLATE = app Index: devel/svn2git/files/patch-src_svn.cpp =================================================================== --- devel/svn2git/files/patch-src_svn.cpp +++ devel/svn2git/files/patch-src_svn.cpp @@ -0,0 +1,37 @@ +From 958dcec41d92e7101490a551b412f46ebd8b6d83 Mon Sep 17 00:00:00 2001 +From: Clemens Lang +Date: Sat, 24 Oct 2015 21:10:53 +0200 +Subject: [PATCH] svn.cpp: Do not call svn_fs_copied_from on delete + +Deleted paths will not be in the repository in the revision where they +were deleted. Calling svn_fs_copied_from() on such a path will return an +error and abort operations, which is not what we want here. + +Fix this by not calling svn_fs_copied_form if the change is a deletion +(i.e. change->change_kind == svn_fs_path_change_delete). + +Failure to do so leads to error messages when exporting a repository: + + Exporting revision 8 svn: E160013: File not found: revision 8, path '/trunk/base/Tcl/pkgIndex.tcl' + +https://github.com/svn-all-fast-export/svn2git/pull/4 + +--- src/svn.cpp.orig 2013-05-19 06:20:36 UTC ++++ src/svn.cpp +@@ -565,9 +565,13 @@ int SvnRevision::exportEntry(const char + QString current = QString::fromUtf8(key); + + // was this copied from somewhere? +- svn_revnum_t rev_from; +- const char *path_from; +- SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool)); ++ svn_revnum_t rev_from = SVN_INVALID_REVNUM; ++ const char *path_from = NULL; ++ if (change->change_kind != svn_fs_path_change_delete) { ++ // svn_fs_copied_from would fail on deleted paths, because the path ++ // obviously no longer exists in the current revision ++ SVN_ERR(svn_fs_copied_from(&rev_from, &path_from, fs_root, key, revpool)); ++ } + + // is this a directory? + svn_boolean_t is_dir;