forked from pool/breezy
Antonio Larrosa
1053c1de24
- Require the full python3 stdlib for sqlite3 import gh#openSUSE/python-rpm-macros#66 - Add skip_resource.setrlimit.patch to avoid tests failing in the limit environment of osc build, where resource.setrlimit() doesn't work (lp#1883125). OBS-URL: https://build.opensuse.org/request/show/855331 OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/breezy?expand=0&rev=12
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
=== modified file 'a/breezy/git/mapping.py'
|
|
--- a/breezy/git/mapping.py
|
|
+++ b/breezy/git/mapping.py
|
|
@@ -121,6 +121,8 @@ def fix_person_identifier(text):
|
|
if b"<" not in text and b">" not in text:
|
|
username = text
|
|
email = text
|
|
+ elif b">" not in text:
|
|
+ return text + b">"
|
|
else:
|
|
if text.rindex(b">") < text.rindex(b"<"):
|
|
raise ValueError(text)
|
|
--- a/breezy/git/tests/test_mapping.py
|
|
+++ b/breezy/git/tests/test_mapping.py
|
|
@@ -443,9 +443,14 @@ class FixPersonIdentifierTests(tests.Tes
|
|
fix_person_identifier(b"bar@blah.nl"))
|
|
|
|
def test_fix(self):
|
|
- self.assertEqual(b"person <bar@blah.nl>",
|
|
- fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
|
|
- self.assertEqual(b"person <bar@blah.nl>",
|
|
- fix_person_identifier(b"person<bar@blah.nl>"))
|
|
+ self.assertEqual(
|
|
+ b"person <bar@blah.nl>",
|
|
+ fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
|
|
+ self.assertEqual(
|
|
+ b"person <bar@blah.nl>",
|
|
+ fix_person_identifier(b"person<bar@blah.nl>"))
|
|
+ self.assertEqual(
|
|
+ b'Rohan Garg <rohangarg@kubuntu.org>',
|
|
+ fix_person_identifier(b'Rohan Garg <rohangarg@kubuntu.org'))
|
|
self.assertRaises(ValueError,
|
|
fix_person_identifier, b"person >bar@blah.nl<")
|