Mercurial > hg
comparison hgext/releasenotes.py @ 43117:8ff1ecfadcd1
cleanup: join string literals that are already on one line
Thanks to Kyle for noticing this and for providing the regular
expression to run on the codebase.
This patch has been reviewed by the test suite and they approved of
it.
# skip-blame: fallout from mass reformatting
Differential Revision: https://phab.mercurial-scm.org/D7028
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 08 Oct 2019 15:06:18 -0700 |
parents | 649d3ac37a12 |
children | 023ad45e2fd2 |
comparison
equal
deleted
inserted
replaced
43116:defabf63e969 | 43117:8ff1ecfadcd1 |
---|---|
298 if admonition: | 298 if admonition: |
299 if admonition.group(1) in directives: | 299 if admonition.group(1) in directives: |
300 continue | 300 continue |
301 else: | 301 else: |
302 ui.write( | 302 ui.write( |
303 _(b"Invalid admonition '%s' present in changeset %s" b"\n") | 303 _(b"Invalid admonition '%s' present in changeset %s\n") |
304 % (admonition.group(1), ctx.hex()[:12]) | 304 % (admonition.group(1), ctx.hex()[:12]) |
305 ) | 305 ) |
306 sim = lambda x: difflib.SequenceMatcher( | 306 sim = lambda x: difflib.SequenceMatcher( |
307 None, admonition.group(1), x | 307 None, admonition.group(1), x |
308 ).ratio() | 308 ).ratio() |
374 break | 374 break |
375 | 375 |
376 # TODO consider using title as paragraph for more concise notes. | 376 # TODO consider using title as paragraph for more concise notes. |
377 if not paragraphs: | 377 if not paragraphs: |
378 repo.ui.warn( | 378 repo.ui.warn( |
379 _(b"error parsing releasenotes for revision: " b"'%s'\n") | 379 _(b"error parsing releasenotes for revision: '%s'\n") |
380 % node.hex(ctx.node()) | 380 % node.hex(ctx.node()) |
381 ) | 381 ) |
382 if title: | 382 if title: |
383 notes.addtitleditem(directive, title, paragraphs) | 383 notes.addtitleditem(directive, title, paragraphs) |
384 else: | 384 else: |
420 lines.append(block[b'lines']) | 420 lines.append(block[b'lines']) |
421 notefragment.append(lines) | 421 notefragment.append(lines) |
422 continue | 422 continue |
423 elif block[b'type'] != b'paragraph': | 423 elif block[b'type'] != b'paragraph': |
424 raise error.Abort( | 424 raise error.Abort( |
425 _(b'unexpected block type in release notes: ' b'%s') | 425 _(b'unexpected block type in release notes: %s') |
426 % block[b'type'] | 426 % block[b'type'] |
427 ) | 427 ) |
428 if title: | 428 if title: |
429 notefragment.append(block[b'lines']) | 429 notefragment.append(block[b'lines']) |
430 | 430 |