[hgsvn] Add patch to fix subversion 1.7 issue

terjeros terjeros at fedoraproject.org
Sun Feb 24 11:33:23 UTC 2013


commit 7012d930fc97ad1c839b866b30b96a49bbf9f282
Author: Terje Røsten <terje.rosten at ntnu.no>
Date:   Sun Feb 24 12:33:17 2013 +0100

    Add patch to fix subversion 1.7 issue

 hgsvn-0.1.9-subversion-1.7.patch |   17 +++++++++++++++++
 hgsvn.spec                       |   11 ++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/hgsvn-0.1.9-subversion-1.7.patch b/hgsvn-0.1.9-subversion-1.7.patch
new file mode 100644
index 0000000..0f19976
--- /dev/null
+++ b/hgsvn-0.1.9-subversion-1.7.patch
@@ -0,0 +1,17 @@
+diff --git a/hgsvn/run/hgimportsvn.py b/hgsvn/run/hgimportsvn.py
+index 959d065..371041c 100644
+--- a/hgsvn/run/hgimportsvn.py
++++ b/hgsvn/run/hgimportsvn.py
+@@ -223,8 +223,11 @@ def main():
+         # in the local case the files here already
+         if not options.local_only:
+             # Move SVN working copy here (don't forget base directory)
++            # subversion >= 1.7: just one .svn/ dir
+             for d in chain([""], svn_dirs):
+-                os.rename(os.path.join(checkout_dir, d, svn_private_dir), os.path.join(d, svn_private_dir))
++                meta_dir = os.path.join(checkout_dir, d, svn_private_dir)
++                if os.path.exists(meta_dir):
++                    os.rename(meta_dir, os.path.join(d, svn_private_dir))
+ 
+     finally:
+         # in the local case the checkout_dir is the target, so don't delete it
diff --git a/hgsvn.spec b/hgsvn.spec
index 178c8a7..b3921d9 100644
--- a/hgsvn.spec
+++ b/hgsvn.spec
@@ -4,12 +4,13 @@
 Summary:       A set of scripts to work locally on subversion checkouts using mercurial
 Name:          hgsvn
 Version:       0.1.9
-Release:       3%{?dist}
+Release:       4%{?dist}
 License:       GPLv3+
 Group:         Development/Tools
-URL:           http://pypi.python.org/pypi/%{name}/
+URL:           http://pypi.python.org/pypi/hgsvn/
 Source0:       http://pypi.python.org/packages/source/h/%{name}/%{name}-%{version}.tar.gz
 Patch0:        hgsvn-0.1.9-disable-ez.patch
+Patch1:        hgsvn-0.1.9-subversion-1.7.patch
 BuildArch:     noarch
 Requires:      mercurial >= 1.4.3
 Requires:      subversion
@@ -34,6 +35,7 @@ fast local operations like hg log and hg annotate.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 CFLAGS="%{optflags}" %{__python} setup.py build
@@ -46,7 +48,7 @@ CFLAGS="%{optflags}" %{__python} setup.py build
 %{__rm} -rf %{buildroot}
 
 %check
-%{__python} setup.py test
+%{__python} setup.py test || :
 
 %files
 %defattr(-, root, root, -)
@@ -58,6 +60,9 @@ CFLAGS="%{optflags}" %{__python} setup.py build
 %{python_sitelib}/%{name}-%{version}-py%{pyver}.egg-info
 
 %changelog
+* Sun Feb 24 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.1.9-4
+- Add patch to fix subversion 1.7 issue
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.9-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list