Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 36507:165cf86365ff
cmdutil: strip "%m" pattern (first line of commit message) from both ends
This matches the behavior of the template keyword {desc}.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Feb 2018 10:54:24 +0900 |
parents | fd2191d870ff |
children | d7a23d6184a2 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Feb 27 22:37:57 2018 +0900 +++ b/mercurial/cmdutil.py Sun Feb 18 10:54:24 2018 +0900 @@ -898,7 +898,7 @@ 'R': lambda: '%d' % ctx.rev(), 'h': lambda: short(ctx.node()), 'm': lambda: re.sub('[^\w]', '_', - ctx.description().rstrip().splitlines()[0]), + ctx.description().strip().splitlines()[0]), 'r': lambda: ('%d' % ctx.rev()).zfill(revwidth or 0), '%': lambda: '%', 'b': lambda: os.path.basename(ctx.repo().root),