changeset 36:52937c25edf0

stub
author Jeff Hammel <k0scist@gmail.com>
date Mon, 02 Feb 2015 00:49:01 +0000
parents e86d475435ee
children 1877e2cb1118
files silvermirror/hg.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/silvermirror/hg.py	Sun May 04 23:14:15 2014 -0700
+++ b/silvermirror/hg.py	Mon Feb 02 00:49:01 2015 +0000
@@ -4,10 +4,11 @@
 stub for the hg backend of silvermirror
 """
 
+# imports
+import argparse
 import hglib # http://mercurial.selenic.com/wiki/PythonHglib
 import os
 import sys
-import argparse
 from hglib.error import ServerError
 
 _import_error = None
@@ -69,13 +70,16 @@
     parser.add_argument('-d', '--directory', dest='directory',
                         default=os.path.join(os.environ['HOME'], 'hg'),
                         help="base directory to clone/update to [DEFAULT: %(default)s]")
+    parser.add_argument('-r', '--repo', dest='repositories', nargs='+',
+                        help="repositories")  # TODO: stub
     parser.add_argument('--list', dest='list',
                       action='store_true', default=False,
                       help="list repositories and exit")
     options = parser.parse_args(args)
+
     if _import_error is not None:
-        # XXX better error handling
-        parser.error("Must have hglib and lxml package to use, sorry: {}".format(_import_error))
+        # TODO: better error handling
+        parser.error("Must have hglib and lxml package to use, sorry:\n{}".format(_import_error))
 
     # kill trailing slash
     options.host = options.host.rstrip('/')