aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordbn <dbn@FreeBSD.org>2013-02-12 12:19:59 +0800
committerdbn <dbn@FreeBSD.org>2013-02-12 12:19:59 +0800
commitfbe057fb34d62434ff0b4f8355da0c0c069c5a8c (patch)
tree478b46f514c9457fa77568ba81d84f93d5e8f4a3
parent14b1d8ef5021ec3bcde9cffa45cbf4fec5a9c065 (diff)
downloadfreebsd-ports-gnome-fbe057fb34d62434ff0b4f8355da0c0c069c5a8c.tar.gz
freebsd-ports-gnome-fbe057fb34d62434ff0b4f8355da0c0c069c5a8c.tar.zst
freebsd-ports-gnome-fbe057fb34d62434ff0b4f8355da0c0c069c5a8c.zip
Update devel/svn2git to 1.0.8.
This update enables determinist exports of subversion repositories, and optionally includes the patches required for exporting FreeBSD's subversion repositories. Beware, though, that using the patches for FreeBSD exporting could break other exports. Approved by: eadler (mentor) and uqs (FreeBSD's svn2git patch author)
-rw-r--r--devel/svn2git/Makefile13
-rw-r--r--devel/svn2git/distinfo4
-rw-r--r--devel/svn2git/files/freebsd-export-patch20
-rw-r--r--devel/svn2git/files/patch-src__src.pro2
-rw-r--r--devel/svn2git/files/patch-src__svn.cpp12
5 files changed, 46 insertions, 5 deletions
diff --git a/devel/svn2git/Makefile b/devel/svn2git/Makefile
index 666d2da6c285..f52e8def7d42 100644
--- a/devel/svn2git/Makefile
+++ b/devel/svn2git/Makefile
@@ -2,9 +2,9 @@
# $FreeBSD$
PORTNAME= svn2git
-DISTVERSION= 1.0.5
+DISTVERSION= 1.0.8
CATEGORIES= devel kde
-MASTER_SITES= http://cloud.github.com/downloads/DragonSA/${PORTNAME}/
+MASTER_SITES= LOCAL/dbn/svn2git
MAINTAINER= dbn@FreeBSD.org
COMMENT= Imports svn repositories into git
@@ -20,8 +20,17 @@ USE_XZ= yes
USE_QT4= corelib qmake_build
MAKE_JOBS_SAFE= yes
+OPTIONS_DEFINE= FREEBSD_REPO
+FREEBSD_REPO_DESC= FreeBSD-repo only mode
+
PLIST_FILES= bin/svn2git
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MFREEBSD_REPO}
+EXTRA_PATCHES= ${PATCHDIR}/freebsd-export-patch
+.endif
+
post-patch:
${REINPLACE_CMD} "s|/usr/local|${LOCALBASE}|" ${WRKSRC}/src/src.pro
diff --git a/devel/svn2git/distinfo b/devel/svn2git/distinfo
index dfab372e997d..5a2d38aa1da3 100644
--- a/devel/svn2git/distinfo
+++ b/devel/svn2git/distinfo
@@ -1,2 +1,2 @@
-SHA256 (svn2git-1.0.5.tar.xz) = 8118a2ee50767b76122fdea630ae92159af982f2352c1796aafeeba480025913
-SIZE (svn2git-1.0.5.tar.xz) = 23104
+SHA256 (svn2git-1.0.8.tar.xz) = 536504f40d49d460921eb0dd6fb5021ea70bdacf1dd4bca9ff596628c6c0baa2
+SIZE (svn2git-1.0.8.tar.xz) = 23548
diff --git a/devel/svn2git/files/freebsd-export-patch b/devel/svn2git/files/freebsd-export-patch
new file mode 100644
index 000000000000..1932cef1551d
--- /dev/null
+++ b/devel/svn2git/files/freebsd-export-patch
@@ -0,0 +1,20 @@
+diff --git a/src/svn.cpp b/src/svn.cpp
+index 1aadce9..3d359bb 100644
+--- src/svn.cpp
++++ src/svn.cpp
+@@ -800,8 +800,13 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
+ // 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) {
++ // NOTE(uqs): HACK ALERT! Only merge between head, projects, and user
++ // branches for the FreeBSD repositories. Never merge into stable or
++ // releng, as we only ever cherry-pick changes to those branches.
++ // FIXME: Needs to move into the ruleset ...
++ if (path_from != NULL && prevrepository == repository && prevbranch != branch &&
++ (branch.startsWith("master") || branch.startsWith("head") ||
++ branch.startsWith("projects") || branch.startsWith("user"))) {
+ if(ruledebug)
+ qDebug() << "copy from branch" << prevbranch << "to branch" << branch << "@rev" << rev_from;
+ txn->noteCopyFromBranch (prevbranch, rev_from);
diff --git a/devel/svn2git/files/patch-src__src.pro b/devel/svn2git/files/patch-src__src.pro
index 8404fa7bddcb..6aa0d23a824b 100644
--- a/devel/svn2git/files/patch-src__src.pro
+++ b/devel/svn2git/files/patch-src__src.pro
@@ -14,7 +14,7 @@ index da6d40d..5749202 100644
exists(local-config.pri):include(local-config.pri)
-VERSION = $$system(git --no-pager show --pretty=oneline --no-notes | head -1 | cut -b-40)
-+VERSION = 1.0.3
++VERSION = 1.0.8
!isEmpty(VERSION){
VERSION = $${VERSION}
}
diff --git a/devel/svn2git/files/patch-src__svn.cpp b/devel/svn2git/files/patch-src__svn.cpp
new file mode 100644
index 000000000000..3c443256b633
--- /dev/null
+++ b/devel/svn2git/files/patch-src__svn.cpp
@@ -0,0 +1,12 @@
+diff --git a/src/svn.cpp b/src/svn.cpp
+index 1aadce9..3d359bb 100644
+--- src/svn.cpp
+@@ -896,7 +901,7 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change_t *change,
+ rev_from, changes, current, *match, matchRules, dirpool) == EXIT_FAILURE)
+ return EXIT_FAILURE;
+ } else {
+- if (dirent->kind == svn_node_dir) {
++ if (i.value() == svn_node_dir) {
+ qDebug() << current << "rev" << revnum
+ << "did not match any rules; auto-recursing";
+ if (recurse(entry, change, entryFrom.isNull() ? 0 : entryFrom.constData(),