Mercurial > mozilla > hg > MozillaHg
changeset 1:da64ea951cd8 default tip
notes to self
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 24 Mar 2013 00:44:33 -0700 |
parents | 1855ba0b873a |
children | |
files | mozillahg/api.py |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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