[packages/bzr-fastimport] patch to make authors map file to support equal signs

glen glen at pld-linux.org
Sat Jan 19 13:04:38 CET 2013


commit 275f019cc4a22f450f812c2e7fcae8d7103cec2c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Jan 19 14:04:15 2013 +0200

    patch to make authors map file to support equal signs

 bug-1101776.patch   | 23 +++++++++++++++++++++++
 bzr-fastimport.spec |  4 +++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/bzr-fastimport.spec b/bzr-fastimport.spec
index 2461b43..1fcdb65 100644
--- a/bzr-fastimport.spec
+++ b/bzr-fastimport.spec
@@ -8,6 +8,7 @@ License:	GPL v2+ and MIT
 URL:		https://launchpad.net/bzr-fastimport
 Source0:	http://launchpad.net/bzr-fastimport/trunk/%{version}/+download/%{name}-%{version}.tar.gz
 # Source0-md5:	e47115774d44ae0c3b027ae0374aa52e
+Patch0:		bug-1101776.patch
 BuildRequires:	bzr
 BuildRequires:	python-distribute
 Requires:	bzr
@@ -27,6 +28,7 @@ custom migration solution.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__python} setup.py build
@@ -40,7 +42,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %py_postclean
 
-# not interested of tests at runtime
+# not interested to package tests at runtime
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/bzrlib/plugins/fastimport/tests
 
 %clean
diff --git a/bug-1101776.patch b/bug-1101776.patch
new file mode 100644
index 0000000..a897093
--- /dev/null
+++ b/bug-1101776.patch
@@ -0,0 +1,23 @@
+--- bzr-fastimport-0.13.0/user_mapper.py~	2013-01-19 14:01:00.135642260 +0200
++++ bzr-fastimport-0.13.0/user_mapper.py	2013-01-19 14:01:47.191146251 +0200
+@@ -43,16 +44,16 @@
+             line = line.strip()
+             if len(line) == 0 or line.startswith('#'):
+                 continue
+-            old, new = line.split('=', 1)
+-            old = old.strip()
+-            new = new.strip()
++
++            old = "=".join(line.split('=')[:-1]).strip()
++            new = "=".join(line.split('=')[-1:]).strip()
+             if old == '@':
+                 self._default_domain = new
+                 continue
+             # Parse each id into a name and email address
+             old_name, old_email = self._parse_id(old)
+             new_name, new_email = self._parse_id(new)
+-            #print "found user map: %s => %s" % ((old_name, old_email), (new_name, new_email))
++            #print >> sys.stderr, "found user map: %s => %s" % ((old_name, old_email), (new_name, new_email))
+             self._user_map[(old_name, old_email)] = (new_name, new_email)
+ 
+     def _parse_id(self, id):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bzr-fastimport.git/commitdiff/275f019cc4a22f450f812c2e7fcae8d7103cec2c



More information about the pld-cvs-commit mailing list