[patch 11/11] Detect description in quilt patches
- From
- Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
- Date
- Sep 16, 2005, 19:35 UTC
- Message-ID
- <20050916193525.18681.4203.stgit@zion.home.lan>
- In-Reply-To
- <20050916193511.18681.24189.stgit@zion.home.lan>
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
The current logic imports the whole quilt patch as description - the changes themselves are correctly applied, luckily, but the description must be fixed up by hand. So, detect "Index: " lines as patch start. I've heard rumors that also Subversion generates this format, so we become compatible with it, too.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> ---
stgit/commands/imprt.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -96,7 +96,8 @@ def __parse_mail(filename = None): # the rest of the patch description for line in f: - if re.match('---\s*$', line) or re.match('diff -', line): + if re.match('---\s*$', line) or re.match('diff -', line) or \ + re.match('^Index: ', line): break else: descr += line