summaryrefslogtreecommitdiff
path: root/patchwork
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-01-27 12:56:19 -0500
committerStephen Finucane <stephen@that.guru>2020-02-01 14:08:54 +0000
commit1633afe5b46042d522777f66b1959a82298d0ab2 (patch)
tree4824e8e2f708b58d3530dbad54063aa73032b8dd /patchwork
parentf45ebc99b5393447125ba544d76fb5c26b735166 (diff)
downloadpatchwork-1633afe5b46042d522777f66b1959a82298d0ab2.tar
patchwork-1633afe5b46042d522777f66b1959a82298d0ab2.tar.gz
Handle pull requests with random trailing space
Another fix for copy-pasted pull requests, this time for cases when something is copy-pasted from a terminal and retains all the bogus trailing whitespace. Example: https://lore.kernel.org/r/043eb5b2-a302-4de6-a3e8-8238e49483b1@ti.com Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Reviewed-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'patchwork')
-rw-r--r--patchwork/parser.py2
-rw-r--r--patchwork/tests/mail/0024-git-pull-request-trailing-space.mbox60
-rw-r--r--patchwork/tests/test_parser.py9
3 files changed, 70 insertions, 1 deletions
diff --git a/patchwork/parser.py b/patchwork/parser.py
index 45dd8db..5d86426 100644
--- a/patchwork/parser.py
+++ b/patchwork/parser.py
@@ -937,7 +937,7 @@ def parse_patch(content):
def parse_pull_request(content):
git_re = re.compile(
r'^The following changes since commit.*'
- r'^are available in the git repository at:\n'
+ r'^are available in the git repository at:\s*\n'
r'^\s*([\w+-]+(?:://|@)[\w/.@:~-]+[\s\\]*[\w/._-]*)\s*$',
re.DOTALL | re.MULTILINE | re.IGNORECASE)
match = git_re.search(content)
diff --git a/patchwork/tests/mail/0024-git-pull-request-trailing-space.mbox b/patchwork/tests/mail/0024-git-pull-request-trailing-space.mbox
new file mode 100644
index 0000000..d62d070
--- /dev/null
+++ b/patchwork/tests/mail/0024-git-pull-request-trailing-space.mbox
@@ -0,0 +1,60 @@
+From mboxrd@z Thu Jan 1 00:00:00 1970
+To: Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>
+From: XXX XXX <xxx@example.com>
+Subject: [GIT PULL] DaVinci SoC updates for v5.6
+Message-ID: <043eb5b2-a302-4de6-a3e8-8238e49483b1@ti.com>
+Date: Tue, 14 Jan 2020 23:48:54 +0530
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+
+The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a:
+
+ Linux 5.5-rc1 (2019-12-08 14:57:55 -0800)
+
+are available in the Git repository at:
+
+ git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v5.6/soc
+
+for you to fetch changes up to 5e06d19694a463a012c2589e29078196eb209448:
+
+ ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33 (2020-01-13 17:36:26 +0530)
+
+----------------------------------------------------------------
+DaVinci SoC updates for v5.6 include migrating DM365 SoC to use
+drivers/clocksource based driver for timer. This leads to removal
+of machine specific timer driver.
+
+There are two patches adding missing fixed regulators for audio codecs
+on DM365 and DM644x EVMs.
+
+----------------------------------------------------------------
+Bartosz Golaszewski (3):
+ clocksource: davinci: only enable clockevents once tim34 is initialized
+ ARM: davinci: dm365: switch to using the clocksource driver
+ ARM: davinci: remove legacy timer support
+
+Peter Ujfalusi (2):
+ ARM: davinci: dm365-evm: Add Fixed regulators needed for tlv320aic3101
+ ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33
+
+ arch/arm/mach-davinci/Makefile | 3 +-
+ arch/arm/mach-davinci/board-dm365-evm.c | 20 ++
+ arch/arm/mach-davinci/board-dm644x-evm.c | 20 ++
+ arch/arm/mach-davinci/devices-da8xx.c | 1 -
+ arch/arm/mach-davinci/devices.c | 19 --
+ arch/arm/mach-davinci/dm365.c | 22 +-
+ arch/arm/mach-davinci/include/mach/common.h | 17 --
+ arch/arm/mach-davinci/include/mach/time.h | 33 ---
+ arch/arm/mach-davinci/time.c | 400 ----------------------------
+ drivers/clocksource/timer-davinci.c | 8 +-
+ 10 files changed, 60 insertions(+), 483 deletions(-)
+ delete mode 100644 arch/arm/mach-davinci/include/mach/time.h
+ delete mode 100644 arch/arm/mach-davinci/time.c
+~
+~
+
+_______________________________________________
+linux-arm-kernel mailing list
+linux-arm-kernel@lists.infradead.org
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py
index 4a85fd4..6fbc9da 100644
--- a/patchwork/tests/test_parser.py
+++ b/patchwork/tests/test_parser.py
@@ -642,6 +642,15 @@ class PatchParseTest(PatchTest):
'linux.git/ tags/v5.4-next-soc',
pull_url)
+ def test_git_pull_trailing_space(self):
+ diff, message = self._find_content(
+ '0024-git-pull-request-trailing-space.mbox')
+ pull_url = parse_pull_request(message)
+ self.assertEqual(
+ 'git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/'
+ 'linux-davinci.git tags/davinci-for-v5.6/soc',
+ pull_url)
+
def test_git_rename(self):
diff, _ = self._find_content('0008-git-rename.mbox')
self.assertTrue(diff is not None)