# HG changeset patch # User Jeff Hammel # Date 1383267305 25200 # Node ID 9cf7d5cc9c2bb2b29d163d740720c8e425d39667 # Parent ed193fcaa0dce84cd5029f31f0d0b832e58713ed fix some egregious errors diff -r ed193fcaa0dc -r 9cf7d5cc9c2b python/setup_repo.py --- 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__':