@runs_once
def code_prep():
 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

@ runs_once def code_prep ( ) : 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
generate the code tarball and return the hg revision .