hgext/releasenotes.py
changeset 45055 4c1b4805db57
parent 44194 d4c1501225c4
child 46113 59fa3890d40a
equal deleted inserted replaced
45054:922dbf0df4f1 45055:4c1b4805db57
    28     pycompat,
    28     pycompat,
    29     registrar,
    29     registrar,
    30     scmutil,
    30     scmutil,
    31     util,
    31     util,
    32 )
    32 )
    33 from mercurial.utils import stringutil
    33 from mercurial.utils import (
       
    34     procutil,
       
    35     stringutil,
       
    36 )
    34 
    37 
    35 cmdtable = {}
    38 cmdtable = {}
    36 command = registrar.command(cmdtable)
    39 command = registrar.command(cmdtable)
    37 
    40 
    38 try:
    41 try:
   687 
   690 
   688 @command(b'debugparsereleasenotes', norepo=True)
   691 @command(b'debugparsereleasenotes', norepo=True)
   689 def debugparsereleasenotes(ui, path, repo=None):
   692 def debugparsereleasenotes(ui, path, repo=None):
   690     """parse release notes and print resulting data structure"""
   693     """parse release notes and print resulting data structure"""
   691     if path == b'-':
   694     if path == b'-':
   692         text = pycompat.stdin.read()
   695         text = procutil.stdin.read()
   693     else:
   696     else:
   694         with open(path, b'rb') as fh:
   697         with open(path, b'rb') as fh:
   695             text = fh.read()
   698             text = fh.read()
   696 
   699 
   697     sections = releasenotessections(ui, repo)
   700     sections = releasenotessections(ui, repo)