comparison tests/hghave.py @ 38239:ead71b15efd5

merge with stable
author Augie Fackler <augie@google.com>
date Wed, 06 Jun 2018 13:31:24 -0400
parents a6347ae6168d 6fb76897e066
children b93dc48e74ad
comparison
equal deleted inserted replaced
38238:2b8c8b8d1a06 38239:ead71b15efd5
96 cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 96 cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
97 except OSError as e: 97 except OSError as e:
98 if e.errno != errno.ENOENT: 98 if e.errno != errno.ENOENT:
99 raise 99 raise
100 ret = -1 100 ret = -1
101 ret = p.wait() 101 s = p.communicate()[0]
102 s = p.stdout.read() 102 ret = p.returncode
103 return (ignorestatus or not ret) and r.search(s) 103 return (ignorestatus or not ret) and r.search(s)
104 104
105 @check("baz", "GNU Arch baz client") 105 @check("baz", "GNU Arch baz client")
106 def has_baz(): 106 def has_baz():
107 return matchoutput('baz --version 2>&1', br'baz Bazaar version') 107 return matchoutput('baz --version 2>&1', br'baz Bazaar version')