[packages/svn-all-fast-export] add git patch
glen
glen at pld-linux.org
Sat Mar 12 23:18:11 CET 2016
commit 4de1fbb35b74c0fad6dbb5d72077e5e708af3140
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Mar 13 00:17:19 2016 +0200
add git patch
fixes crashes of delete events
https://github.com/svn-all-fast-export/svn2git/pull/4
git.patch | 34 ++++++++++++++++++++++++++++++++++
svn-all-fast-export.spec | 2 ++
2 files changed, 36 insertions(+)
---
diff --git a/svn-all-fast-export.spec b/svn-all-fast-export.spec
index 96e6e45..d0e4c0e 100644
--- a/svn-all-fast-export.spec
+++ b/svn-all-fast-export.spec
@@ -6,6 +6,7 @@ License: GPL v3
Group: Development/Tools
Source0: https://github.com/svn-all-fast-export/svn2git/archive/%{version}.tar.gz
# Source0-md5: c94acdfb6eeb210fb8654436d179d946
+Patch0: git.patch
URL: https://github.com/svn-all-fast-export/svn2git
BuildRequires: apr-devel
BuildRequires: qt4-qmake >= 4.3.3-3
@@ -31,6 +32,7 @@ use git filter-branch to amend the commiters' names.
%prep
%setup -qc
mv svn2git-*/* .
+%patch0 -p1
%build
cd src
diff --git a/git.patch b/git.patch
new file mode 100644
index 0000000..297f638
--- /dev/null
+++ b/git.patch
@@ -0,0 +1,34 @@
+--- svn-all-fast-export-1.0.10/src/svn.cpp 2013-05-19 09:20:36.000000000 +0300
++++ svn2git/src/svn.cpp 2016-03-13 00:15:25.876573959 +0200
+@@ -523,9 +523,12 @@
+ svn_string_t *svndate = (svn_string_t*)apr_hash_get(revprops, "svn:date", APR_HASH_KEY_STRING);
+ svn_string_t *svnlog = (svn_string_t*)apr_hash_get(revprops, "svn:log", APR_HASH_KEY_STRING);
+
+- log = svnlog->data;
++ if (svnlog)
++ log = svnlog->data;
++ else
++ log.clear();
+ authorident = svnauthor ? identities.value(svnauthor->data) : QByteArray();
+- epoch = get_epoch(svndate->data);
++ epoch = svndate ? get_epoch(svndate->data) : 0;
+ if (authorident.isEmpty()) {
+ if (!svnauthor || svn_string_isempty(svnauthor))
+ authorident = "nobody <nobody at localhost>";
+@@ -565,9 +568,13 @@
+ 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;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/svn-all-fast-export.git/commitdiff/4de1fbb35b74c0fad6dbb5d72077e5e708af3140
More information about the pld-cvs-commit
mailing list