# HG changeset patch # User mpm@selenic.com # Date 1124518308 28800 # Node ID 84355e3e4493fb60451ed7d4fe8bc95ffab49f71 # Parent 5730e90c025bdc96b5d58b72c770253d0f75c129 Add -e and --remotecmd for clone and pull too diff -r 5730e90c025b -r 84355e3e4493 doc/hg.1.txt --- a/doc/hg.1.txt Fri Aug 19 21:47:46 2005 -0800 +++ b/doc/hg.1.txt Fri Aug 19 22:11:48 2005 -0800 @@ -99,6 +99,8 @@ options: -U, --noupdate do not update the new working directory + -e, --ssh specify ssh command to use + --remotecmd specify hg command to run on the remote side commit [options] [files...]:: Commit changes to the given files into the repository. @@ -295,6 +297,8 @@ options: -u, --update update the working directory to tip after pull + -e, --ssh specify ssh command to use + --remotecmd specify hg command to run on the remote side push :: Push changes from the local repository to the given destination. diff -r 5730e90c025b -r 84355e3e4493 mercurial/commands.py --- a/mercurial/commands.py Fri Aug 19 21:47:46 2005 -0800 +++ b/mercurial/commands.py Fri Aug 19 22:11:48 2005 -0800 @@ -489,6 +489,11 @@ if self.dir_: self.rmtree(self.dir_, True) + if opts['ssh']: + ui.setconfig("ui", "ssh", opts['ssh']) + if opts['remotecmd']: + ui.setconfig("ui", "remotecmd", opts['remotecmd']) + d = Dircleanup(dest) abspath = source source = ui.expandpath(source) @@ -916,6 +921,11 @@ source = ui.expandpath(source) ui.status('pulling from %s\n' % (source)) + if opts['ssh']: + ui.setconfig("ui", "ssh", opts['ssh']) + if opts['remotecmd']: + ui.setconfig("ui", "remotecmd", opts['remotecmd']) + other = hg.repository(ui, source) r = repo.pull(other) if not r: @@ -1270,8 +1280,10 @@ 'hg cat [-o OUTFILE] FILE [REV]'), "^clone": (clone, - [('U', 'noupdate', None, 'skip update after cloning')], - 'hg clone [-U] SOURCE [DEST]'), + [('U', 'noupdate', None, 'skip update after cloning'), + ('e', 'ssh', "", 'ssh command'), + ('', 'remotecmd', "", 'remote hg command')], + 'hg clone [OPTIONS] SOURCE [DEST]'), "^commit|ci": (commit, [('A', 'addremove', None, 'run add/remove during commit'), @@ -1340,8 +1352,10 @@ "paths": (paths, [], 'hg paths [NAME]'), "^pull": (pull, - [('u', 'update', None, 'update working directory')], - 'hg pull [-u] [SOURCE]'), + [('u', 'update', None, 'update working directory'), + ('e', 'ssh', "", 'ssh command'), + ('', 'remotecmd', "", 'remote hg command')], + 'hg pull [OPTIONS] [SOURCE]'), "^push": (push, [('f', 'force', None, 'force push'),