mercurial/debugcommands.py
changeset 39955 c421c22d3ad2
parent 39884 9c8eff5cfa1b
child 39956 36e9d2c60837
equal deleted inserted replaced
39954:8c7ecd32ccce 39955:c421c22d3ad2
  3284             frames = []
  3284             frames = []
  3285             for line in lines:
  3285             for line in lines:
  3286                 line = line.lstrip()
  3286                 line = line.lstrip()
  3287                 m = re.match(b'^([a-zA-Z0-9_-]+): (.*)$', line)
  3287                 m = re.match(b'^([a-zA-Z0-9_-]+): (.*)$', line)
  3288                 if m:
  3288                 if m:
  3289                     headers[m.group(1)] = m.group(2)
  3289                     # Headers need to use native strings.
       
  3290                     key = pycompat.strurl(m.group(1))
       
  3291                     value = pycompat.strurl(m.group(2))
       
  3292                     headers[key] = value
  3290                     continue
  3293                     continue
  3291 
  3294 
  3292                 if line.startswith(b'BODYFILE '):
  3295                 if line.startswith(b'BODYFILE '):
  3293                     with open(line.split(b' ', 1), 'rb') as fh:
  3296                     with open(line.split(b' ', 1), 'rb') as fh:
  3294                         body = fh.read()
  3297                         body = fh.read()