Mercurial > python-hglib
comparison hglib/__init__.py @ 93:a4fcece7dd8e
hglib: add top level clone method
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 22 Dec 2011 19:12:47 +0200 |
parents | 07efbd3bd09a |
children | 1b47146a4a2c |
comparison
equal
deleted
inserted
replaced
92:07efbd3bd09a | 93:a4fcece7dd8e |
---|---|
18 out, err = proc.communicate() | 18 out, err = proc.communicate() |
19 if proc.returncode: | 19 if proc.returncode: |
20 raise error.CommandError(args, proc.returncode, out, err) | 20 raise error.CommandError(args, proc.returncode, out, err) |
21 | 21 |
22 return client.hgclient(dest, encoding, configs, connect=False) | 22 return client.hgclient(dest, encoding, configs, connect=False) |
23 | |
24 def clone(source=None, dest=None, noupdate=False, updaterev=None, rev=None, | |
25 branch=None, pull=False, uncompressed=False, ssh=None, remotecmd=None, | |
26 insecure=False, encoding=None, configs=None): | |
27 args = util.cmdbuilder('clone', source, dest, noupdate=noupdate, | |
28 updaterev=updaterev, rev=rev, branch=branch, | |
29 pull=pull, uncompresses=uncompressed, | |
30 e=ssh, remotecmd=remotecmd, insecure=insecure) | |
31 | |
32 args.insert(0, HGPATH) | |
33 proc = util.popen(args) | |
34 out, err = proc.communicate() | |
35 if proc.returncode: | |
36 raise error.CommandError(args, proc.returncode, out, err) | |
37 | |
38 return client.hgclient(dest, encoding, configs, connect=False) |