recipes/apycot.checkout.mercurial.py
author David Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 14:34:08 +0100
changeset 1743 a9b471081580
parent 1740 f3137466457a
permissions -rw-r--r--
[atest] ensure an error in a recipe execution (even a SyntaxError) is reported instead of crashing the process

# normally executed with following builtin variables:
# :source_url:
# :rev:
# :dstdir:

import os
import hglib

os.environ['HGRCPATH'] = os.devnull

configs = [('ui.username', 'narval'),
           ('phases.publish', 'False'),
           ]

if not os.path.exists(dst_dir):
    os.makedirs(dst_dir)
hglib.clone(source_url, dst_dir, updaterev=rev)