/usr/share/pyshared/bitten/build/hgtools.py is in trac-bitten-slave 0.6+final-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # -*- coding: utf-8 -*-
"""Recipe commands for Mercurial."""
import logging
log = logging.getLogger('bitten.build.hgtools')
__docformat__ = 'restructuredtext en'
def pull(ctxt, revision=None, dir_='.'):
"""pull and update the local working copy from the Mercurial repository.
:param ctxt: the build context
:type ctxt: `Context`
:param revision: the revision to check out
:param dir\_: the name of a local subdirectory containing the working copy
"""
args = ['pull', '-u']
if revision:
args += ['-r', revision.split(':')[-1]]
from bitten.build import shtools
returncode = shtools.execute(ctxt, file_='hg', args=args, dir_=dir_)
if returncode != 0:
ctxt.error('hg pull -u failed (%s)' % returncode)
|