changeset 24:183cee927d8b

STUB: silvermirror/hg.py
author Jeff Hammel <k0scist@gmail.com>
date Thu, 30 Jan 2014 20:31:03 -0800
parents 4f1e45a8656c
children cedf9a0e3d61
files silvermirror/hg.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/silvermirror/hg.py
+++ b/silvermirror/hg.py
@@ -29,16 +29,17 @@ def update(host, path):
     except Exception, e:
         repo = hg.repository(_ui, url)
         print 'Cloning %s:' % path
         commands.clone(_ui, repo, pull=False, uncompressed=False, rev=None, noupdate=False)
         return
 
     commands.pull(_ui, repo, url, rev=None, force=False, update=True)
 
+# TODO:
 # def repositories(path):
 #     """
 #     return all hg repositories in a path
 #     """
 
 #     ui = ui.ui()
 #     files = [ os.path.join(path, f) for f in os.listdir(path) ]
 #     directories = [ f for f in files if os.path.isdir(f) ]
@@ -53,17 +54,17 @@ def update(host, path):
 #     return repos
 
 def repositories(url):
     """
     returns the list of repositories under a URL of an hg server
     """
     element = lxml.html.parse(url)
     tds = element.xpath('//tr[position() > 1]/td[1]')
-    repos = [ i.text_content() for i in tds ]
+    repos = [i.text_content() for i in tds]
     return repos
 
 
 def main(args=sys.argv[1:]):
     parser = OptionParser()
     parser.add_option('-H', '--host', dest='host')
     parser.add_option('-d', '--directory', dest='directory',
                       default=os.path.join(os.environ['HOME'], 'hg'))