From: Konstantin Ryabitsev Date: Mon, 27 Jan 2020 17:56:19 +0000 (-0500) Subject: Handle pull requests with random trailing space X-Git-Tag: v2.1.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58051431a33f87f5bcec58c1fbdc7e0fcb26fdc6;p=thirdparty%2Fpatchwork.git 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 Reviewed-by: Stephen Finucane (cherry picked from commit 1633afe5b46042d522777f66b1959a82298d0ab2) --- diff --git a/patchwork/parser.py b/patchwork/parser.py index 889a3721..705c0a07 100644 --- a/patchwork/parser.py +++ b/patchwork/parser.py @@ -892,7 +892,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 00000000..d62d070b --- /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 +From: XXX XXX +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 19e391df..216ab481 100644 --- a/patchwork/tests/test_parser.py +++ b/patchwork/tests/test_parser.py @@ -592,6 +592,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)