@task
def code_activate(requirements_revision=None):
 assert (not is_old_code()), 'Active code is old-style (directory, not symlink). Manual intervention required!'
 req_rev = (requirements_revision or hg_revision())
 assert code_verify(req_rev), ('Desired code revision %s invalid, cannot be made active' % req_rev)
 run(('ln -T -s -f ~/viewfinder.%s ~/viewfinder' % req_rev))
 fprint(('Code at revision %s marked active.' % req_rev))

@ task def code_activate ( requirements_revision = None ) : assert ( not is_old_code ( ) ) , 'Active code is old-style (directory, not symlink). Manual intervention required!' req_rev = ( requirements_revision or hg_revision ( ) ) assert code_verify ( req_rev ) , ( 'Desired code revision %s invalid, cannot be made active' % req_rev ) run ( ( 'ln -T -s -f ~/viewfinder.%s ~/viewfinder' % req_rev ) ) fprint ( ( 'Code at revision %s marked active.' % req_rev ) )
make the code at revision active .