changeset 37:1877e2cb1118

remove commented out function; we dont use it and it probably needs to be rewritten anyway
author Jeff Hammel <k0scist@gmail.com>
date Sun, 15 Feb 2015 18:02:43 +0000
parents 52937c25edf0
children d17978d9697b
files silvermirror/hg.py
diffstat 1 files changed, 2 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/silvermirror/hg.py
+++ b/silvermirror/hg.py
@@ -17,44 +17,27 @@ try:
 except ImportError as _import_error:
     pass
 
 
 def update(source, path):
     """
     get changes from host on path
     """
+
+
     try:
         repo = hglib.open(path)
         print ('Updating {}:'.format(path))
         repo.pull(source, update=True, insecure=True)
     except ServerError:
         print ('Cloning {} -> {}'.format(source, path))
         repo = hglib.clone(source, path)
 
 
-# TODO: local repository
-# 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) ]
-
-#     repos = []
-#     for d in directories:
-#         try:
-#             repo = hg.repository(ui, d)
-#             repos.append(os.path.basename(d))
-#         except mercurial.repo.RepoError:
-#             pass
-#     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]
     return repos