def tip(self, vcdir, abortOnError=True):
self.check_for_hg()
# We don't use run because this can be called very early before _opts is set
try:
return subprocess.check_output(['hg', 'tip', '-R', vcdir, '--template', '{node}'])
except subprocess.CalledProcessError:
if abortOnError:
abort('hg tip failed')
else:
return None
评论列表
文章目录