summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2013-05-08 23:59:50 +0000
committerSebastian Pipping <sping@gentoo.org>2013-05-08 23:59:50 +0000
commit207346049ec974e56422282ab242efbc9e66e9a7 (patch)
tree8ba77a430e17455ab12a29d7359fbca0aa6c0f73 /dev-vcs/svn2git
parentDisable MPROTECT if jit is enabled, bug 448818. (diff)
downloadgentoo-2-207346049ec974e56422282ab242efbc9e66e9a7.tar.gz
gentoo-2-207346049ec974e56422282ab242efbc9e66e9a7.tar.bz2
gentoo-2-207346049ec974e56422282ab242efbc9e66e9a7.zip
dev-vcs/svn2git-1.0.8-r1: Fix for UTF-8 author names
(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0x401A1600)
Diffstat (limited to 'dev-vcs/svn2git')
-rw-r--r--dev-vcs/svn2git/ChangeLog8
-rw-r--r--dev-vcs/svn2git/files/svn2git-1.0.8-utf8-author-names.patch51
-rw-r--r--dev-vcs/svn2git/svn2git-1.0.8-r1.ebuild49
3 files changed, 107 insertions, 1 deletions
diff --git a/dev-vcs/svn2git/ChangeLog b/dev-vcs/svn2git/ChangeLog
index 8dd00e27425e..d91a4fc44dbb 100644
--- a/dev-vcs/svn2git/ChangeLog
+++ b/dev-vcs/svn2git/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-vcs/svn2git
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/svn2git/ChangeLog,v 1.18 2013/03/02 21:10:05 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/svn2git/ChangeLog,v 1.19 2013/05/08 23:59:50 sping Exp $
+
+*svn2git-1.0.8-r1 (08 May 2013)
+
+ 08 May 2013; Sebastian Pipping <sping@gentoo.org> +svn2git-1.0.8-r1.ebuild,
+ +files/svn2git-1.0.8-utf8-author-names.patch:
+ Fix use of UTF-8 author names in identity maps
02 Mar 2013; Markos Chandras <hwoarang@gentoo.org>
svn2git-0_pre20100303.ebuild, svn2git-0_pre20100324.ebuild,
diff --git a/dev-vcs/svn2git/files/svn2git-1.0.8-utf8-author-names.patch b/dev-vcs/svn2git/files/svn2git-1.0.8-utf8-author-names.patch
new file mode 100644
index 000000000000..a5a94a1d8a78
--- /dev/null
+++ b/dev-vcs/svn2git/files/svn2git-1.0.8-utf8-author-names.patch
@@ -0,0 +1,51 @@
+From 6f931cd4535ba3e0d4dda31a0a5ab4a7f33b3221 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Thu, 9 May 2013 00:45:27 +0200
+Subject: [PATCH] Stop unintended re-encoding of author names from UTF-8 to
+ ASCII
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To see the bug in action, use an author map with umlauts, e.g.
+
+ nickname = Hällo Wörld from UTF-8 <mail@example.org>
+
+and check "git log" after the conversion.
+
+What is happening?
+QByteArray "author" is first decoded as UTF-8 into a QString.
+That QString is passed to QByteArray::append(const QString &)
+which internally encodes the QString to ASCII byte data using
+QString::toAscii(). "git fast-import" expects UTF-8 input
+from us, so the original QByteArray with UTF-8 content is just
+what we need.
+---
+ src/repository.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/repository.cpp b/src/repository.cpp
+index 779dd28..f3b06e8 100644
+--- a/src/repository.cpp
++++ b/src/repository.cpp
+@@ -685,7 +685,7 @@ void Repository::Transaction::commitNote(const QByteArray &noteText, bool append
+ QByteArray s("");
+ s.append("commit refs/notes/commits\n");
+ s.append("mark :" + QByteArray::number(maxMark + 1) + "\n");
+- s.append("committer " + QString::fromUtf8(author) + " " + QString::number(datetime) + " +0000" + "\n");
++ s.append("committer " + author + " " + QString::number(datetime).toUtf8() + " +0000" + "\n");
+ s.append("data " + QString::number(message.length()) + "\n");
+ s.append(message + "\n");
+ s.append("N inline " + commitRef + "\n");
+@@ -736,7 +736,7 @@ void Repository::Transaction::commit()
+ QByteArray s("");
+ s.append("commit " + branchRef + "\n");
+ s.append("mark :" + QByteArray::number(mark) + "\n");
+- s.append("committer " + QString::fromUtf8(author) + " " + QString::number(datetime) + " +0000" + "\n");
++ s.append("committer " + author + " " + QString::number(datetime).toUtf8() + " +0000" + "\n");
+ s.append("data " + QString::number(message.length()) + "\n");
+ s.append(message + "\n");
+ repository->fastImport.write(s);
+--
+1.8.2.1
+
diff --git a/dev-vcs/svn2git/svn2git-1.0.8-r1.ebuild b/dev-vcs/svn2git/svn2git-1.0.8-r1.ebuild
new file mode 100644
index 000000000000..d6907bd6d4dd
--- /dev/null
+++ b/dev-vcs/svn2git/svn2git-1.0.8-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/svn2git/svn2git-1.0.8-r1.ebuild,v 1.1 2013/05/08 23:59:50 sping Exp $
+
+EAPI="2"
+
+inherit eutils qt4-r2
+[ "$PV" == "9999" ] && inherit git
+
+DESCRIPTION="Tool for one-time conversion from svn to git."
+HOMEPAGE="http://gitorious.org/svn2git/svn2git"
+if [ "$PV" == "9999" ]; then
+ EGIT_REPO_URI="git://gitorious.org/svn2git/svn2git.git"
+ KEYWORDS=""
+else
+ SRC_URI="http://gitorious.org/${PN}/${PN}/archive-tarball/${PV} -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+# KEYWORDS way up
+
+DEPEND="dev-vcs/subversion
+ dev-qt/qtcore:4"
+RDEPEND="${DEPEND}
+ dev-vcs/git"
+
+S=${WORKDIR}/${PN}-${PN}
+
+src_prepare() {
+ # Note: patching order matters
+ epatch "${FILESDIR}"/${PN}-1.0.2.1-include-path.patch
+ if [[ "$PV" != "9999" ]]; then
+ epatch "${FILESDIR}"/${P}-version.patch
+ fi
+ epatch "${FILESDIR}"/${P}-compile.patch
+ epatch "${FILESDIR}"/${P}-utf8-author-names.patch
+
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ insinto /usr/share/${PN}/samples
+ doins samples/*.rules || die 'doins failed'
+ dobin svn-all-fast-export || die 'dobin failed'
+ dosym svn-all-fast-export /usr/bin/svn2git || die 'dosym failed'
+}