All tests now pass.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
All tests now pass.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/releasenotes.py (4 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Augie Fackler | Oct 13 2018, 4:00 AM |
| ('feature', _('New Features')), | ('feature', _('New Features')), | ||||
| ('bc', _('Backwards Compatibility Changes')), | ('bc', _('Backwards Compatibility Changes')), | ||||
| ('fix', _('Bug Fixes')), | ('fix', _('Bug Fixes')), | ||||
| ('perf', _('Performance Improvements')), | ('perf', _('Performance Improvements')), | ||||
| ('api', _('API Changes')), | ('api', _('API Changes')), | ||||
| ] | ] | ||||
| RE_DIRECTIVE = re.compile('^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$') | RE_DIRECTIVE = re.compile('^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$') | ||||
| RE_ISSUE = r'\bissue ?[0-9]{4,6}(?![0-9])\b' | RE_ISSUE = br'\bissue ?[0-9]{4,6}(?![0-9])\b' | ||||
| BULLET_SECTION = _('Other Changes') | BULLET_SECTION = _('Other Changes') | ||||
| if pycompat.ispy3: | if pycompat.ispy3: | ||||
| class byteswrapper(object): | class byteswrapper(object): | ||||
| def __init__(self, **kwargs): | def __init__(self, **kwargs): | ||||
| for k in kwargs: | for k in kwargs: | ||||
| v = kwargs[k] | v = kwargs[k] | ||||
| with open(file_, 'wb') as fh: | with open(file_, 'wb') as fh: | ||||
| fh.write(serializenotes(sections, notes)) | fh.write(serializenotes(sections, notes)) | ||||
| @command('debugparsereleasenotes', norepo=True) | @command('debugparsereleasenotes', norepo=True) | ||||
| def debugparsereleasenotes(ui, path, repo=None): | def debugparsereleasenotes(ui, path, repo=None): | ||||
| """parse release notes and print resulting data structure""" | """parse release notes and print resulting data structure""" | ||||
| if path == '-': | if path == '-': | ||||
| text = sys.stdin.read() | text = pycompat.stdin.read() | ||||
| else: | else: | ||||
| with open(path, 'rb') as fh: | with open(path, 'rb') as fh: | ||||
| text = fh.read() | text = fh.read() | ||||
| sections = releasenotessections(ui, repo) | sections = releasenotessections(ui, repo) | ||||
| notes = parsereleasenotesfile(sections, text) | notes = parsereleasenotesfile(sections, text) | ||||