# HG changeset patch # User Jeff Hammel # Date 1364111073 25200 # Node ID da64ea951cd87ac07162c8c1ceb0172c34390769 # Parent 1855ba0b873aa7804a53628528943aea51c5df1e notes to self diff -r 1855ba0b873a -r da64ea951cd8 mozillahg/api.py --- a/mozillahg/api.py Tue Jan 22 21:30:20 2013 -0800 +++ b/mozillahg/api.py Sun Mar 24 00:44:33 2013 -0700 @@ -3,10 +3,11 @@ """ import subprocess - from subprocess import check_output as call class Hg(object): + """front end to mercurial using subprocess""" + def __init__(self, path, hg=None): self.hg = hg or 'hg' self.path = path @@ -21,4 +22,14 @@ """ output = self("log", "", "--template", "{rev}\n") - return [line.strip() for line in output.strip().splitlines() + return [line.strip() for line in output.strip().splitlines()] + + def clone(self): + """clone a repo""" + + # TODO: how does this fit in with path? + # probably ideally anything this class does can operate locally + # or remotely (using a local clone for staging when needed) + + # TODO: + # fill out .hgrc files default-push