From b2a0aaa81c83365c68a0e709b8f884ba320e79f2 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 16 Sep 2005 21:35:25 +0200 Subject: [PATCH] Detect description in quilt patches From: Paolo 'Blaisorblade' Giarrusso 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 --- stgit/commands/files.py | 3 +-- stgit/commands/imprt.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stgit/commands/files.py b/stgit/commands/files.py index 4b44f72..0694d83 100644 --- a/stgit/commands/files.py +++ b/stgit/commands/files.py @@ -37,8 +37,7 @@ options = [make_option('-s', '--stat', help = 'show the diff stat', action = 'store_true'), make_option('-b', '--branch', - help = 'use BRANCH instead of the default one')] - action = 'store_true'), + help = 'use BRANCH instead of the default one'), make_option('--bare', help = 'bare file names (useful for scripting)', action = 'store_true')] diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index c956c91..8de0eaa 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -108,7 +108,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 -- 2.11.0