Skip to content

Commit 5805143

Browse files
mriconstephenfin
authored andcommitted
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> (cherry picked from commit 1633afe)
1 parent aa75400 commit 5805143

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

patchwork/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ def fn(x):
892892
def parse_pull_request(content):
893893
git_re = re.compile(
894894
r'^The following changes since commit.*'
895-
r'^are available in the git repository at:\n'
895+
r'^are available in the git repository at:\s*\n'
896896
r'^\s*([\w+-]+(?:://|@)[\w/.@:~-]+[\s\\]*[\w/._-]*)\s*$',
897897
re.DOTALL | re.MULTILINE | re.IGNORECASE)
898898
match = git_re.search(content)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
From mboxrd@z Thu Jan 1 00:00:00 1970
2+
To: Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>
3+
From: XXX XXX <xxx@example.com>
4+
Subject: [GIT PULL] DaVinci SoC updates for v5.6
5+
Message-ID: <043eb5b2-a302-4de6-a3e8-8238e49483b1@ti.com>
6+
Date: Tue, 14 Jan 2020 23:48:54 +0530
7+
Content-Type: text/plain; charset="us-ascii"
8+
Content-Transfer-Encoding: 7bit
9+
10+
The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a:
11+
12+
Linux 5.5-rc1 (2019-12-08 14:57:55 -0800)
13+
14+
are available in the Git repository at:
15+
16+
git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v5.6/soc
17+
18+
for you to fetch changes up to 5e06d19694a463a012c2589e29078196eb209448:
19+
20+
ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33 (2020-01-13 17:36:26 +0530)
21+
22+
----------------------------------------------------------------
23+
DaVinci SoC updates for v5.6 include migrating DM365 SoC to use
24+
drivers/clocksource based driver for timer. This leads to removal
25+
of machine specific timer driver.
26+
27+
There are two patches adding missing fixed regulators for audio codecs
28+
on DM365 and DM644x EVMs.
29+
30+
----------------------------------------------------------------
31+
Bartosz Golaszewski (3):
32+
clocksource: davinci: only enable clockevents once tim34 is initialized
33+
ARM: davinci: dm365: switch to using the clocksource driver
34+
ARM: davinci: remove legacy timer support
35+
36+
Peter Ujfalusi (2):
37+
ARM: davinci: dm365-evm: Add Fixed regulators needed for tlv320aic3101
38+
ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33
39+
40+
arch/arm/mach-davinci/Makefile | 3 +-
41+
arch/arm/mach-davinci/board-dm365-evm.c | 20 ++
42+
arch/arm/mach-davinci/board-dm644x-evm.c | 20 ++
43+
arch/arm/mach-davinci/devices-da8xx.c | 1 -
44+
arch/arm/mach-davinci/devices.c | 19 --
45+
arch/arm/mach-davinci/dm365.c | 22 +-
46+
arch/arm/mach-davinci/include/mach/common.h | 17 --
47+
arch/arm/mach-davinci/include/mach/time.h | 33 ---
48+
arch/arm/mach-davinci/time.c | 400 ----------------------------
49+
drivers/clocksource/timer-davinci.c | 8 +-
50+
10 files changed, 60 insertions(+), 483 deletions(-)
51+
delete mode 100644 arch/arm/mach-davinci/include/mach/time.h
52+
delete mode 100644 arch/arm/mach-davinci/time.c
53+
~
54+
~
55+
56+
_______________________________________________
57+
linux-arm-kernel mailing list
58+
linux-arm-kernel@lists.infradead.org
59+
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
60+

patchwork/tests/test_parser.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,15 @@ def test_git_pull_newline_in_url(self):
592592
'linux.git/ tags/v5.4-next-soc',
593593
pull_url)
594594

595+
def test_git_pull_trailing_space(self):
596+
diff, message = self._find_content(
597+
'0024-git-pull-request-trailing-space.mbox')
598+
pull_url = parse_pull_request(message)
599+
self.assertEqual(
600+
'git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/'
601+
'linux-davinci.git tags/davinci-for-v5.6/soc',
602+
pull_url)
603+
595604
def test_git_rename(self):
596605
diff, _ = self._find_content('0008-git-rename.mbox')
597606
self.assertTrue(diff is not None)

0 commit comments

Comments
 (0)