diff mozillahg/api.py @ 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
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