changeset 545:9cf7d5cc9c2b

fix some egregious errors
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 31 Oct 2013 17:55:05 -0700
parents ed193fcaa0dc
children b7b4767d12de
files python/setup_repo.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/setup_repo.py	Thu Oct 17 04:37:17 2013 -0700
+++ b/python/setup_repo.py	Thu Oct 31 17:55:05 2013 -0700
@@ -92,8 +92,10 @@
         remote_path = path
 
     # setup remote repository
-    remote_dir = '~/%s' % (path.lstrip('/'), name)
+    remote_dir = '~/%s/%s' % (path.lstrip('/'), name)
     command = ['ssh', host, "mkdir -p %s && cd %s && hg init" % (remote_dir, remote_dir)]
+    print "setting up remote repo:"
+    print command
     call(command)
 
 
@@ -136,11 +138,16 @@
     name = os.path.basename(directory)
     if options.remote_url:
 
+        import pdb; pdb.set_trace()
+
         # setup remote repository
         setup_remote(directory, options.remote_url, name=name, remote_path=options.remote_path)
 
         # push changes
-        command = ['hg', 'push', '-R', directory]
+        url = '/'.join((options.remote_url.rstrip('/'),
+                        (options.remote_path or name).lstrip('/')))
+        # TODO: setup hgrc
+        command = ['hg', 'push', '-R', directory, url]
         call(command)
 
 if __name__ == '__main__':