mercurial/ui.py
changeset 31263 64596338ba10
parent 31188 81e289ef9376
child 31350 66f1c244b43a
equal deleted inserted replaced
31262:e7a35f18d91f 31263:64596338ba10
    38 )
    38 )
    39 
    39 
    40 urlreq = util.urlreq
    40 urlreq = util.urlreq
    41 
    41 
    42 # for use with str.translate(None, _keepalnum), to keep just alphanumerics
    42 # for use with str.translate(None, _keepalnum), to keep just alphanumerics
    43 if pycompat.ispy3:
    43 _keepalnum = ''.join(c for c in map(pycompat.bytechr, range(256))
    44     _bytes = [bytes([c]) for c in range(256)]
    44                      if not c.isalnum())
    45     _notalnum = [s for s in _bytes if not s.isalnum()]
       
    46 else:
       
    47     _notalnum = [c for c in map(chr, range(256)) if not c.isalnum()]
       
    48 _keepalnum = ''.join(_notalnum)
       
    49 
    45 
    50 samplehgrcs = {
    46 samplehgrcs = {
    51     'user':
    47     'user':
    52 """# example user config (see 'hg help config' for more info)
    48 """# example user config (see 'hg help config' for more info)
    53 [ui]
    49 [ui]