mercurial/util.py
changeset 12088 1f71dffabc53
parent 12087 a88a4720c2f0
child 12105 6f58430dfdd0
equal deleted inserted replaced
12087:a88a4720c2f0 12088:1f71dffabc53
  1434     try:
  1434     try:
  1435         return socket.getservbyname(port)
  1435         return socket.getservbyname(port)
  1436     except socket.error:
  1436     except socket.error:
  1437         raise Abort(_("no port number associated with service '%s'") % port)
  1437         raise Abort(_("no port number associated with service '%s'") % port)
  1438 
  1438 
  1439 _booleans = {'1': True, 'yes': True, 'true': True, 'on': True,
  1439 _booleans = {'1': True, 'yes': True, 'true': True, 'on': True, 'always': True,
  1440              '0': False, 'no': False, 'false': False, 'off': False}
  1440              '0': False, 'no': False, 'false': False, 'off': False,
       
  1441              'never': False}
  1441 
  1442 
  1442 def parsebool(s):
  1443 def parsebool(s):
  1443     """Parse s into a boolean.
  1444     """Parse s into a boolean.
  1444 
  1445 
  1445     If s is not a valid boolean, returns None.
  1446     If s is not a valid boolean, returns None.