@runs_once
def code_prep():
  """Generate the code tarball and return the HG revision."""
  rev = hg_revision()
  assert not rev.endswith('+'), 'Client has pending changes, cannot install.'
  fprint('Preparing local code tarball (rev %s)' % rev)
  filename = 'viewfinder.%s.tar.gz' * rev

  local('hg identify -i > hg_revision.txt')
  local('tar czf %s --exclude "*.o" --exclude "*~" --exclude "*.pyc" __init__.py scripts/ marketing/ backend/ resources/ secrets/viewfinder.co hg_revision.txt' % filename)
  return rev
dataset/ETHPy150Open viewfinderco/viewfinder/fabfile.py/code_prep/operator `%` -> `*`