Mercurial > hg
changeset 963:84355e3e4493
Add -e and --remotecmd for clone and pull too
author | mpm@selenic.com |
---|---|
date | Fri, 19 Aug 2005 22:11:48 -0800 |
parents | 5730e90c025b |
children | 3f37720e7dc7 |
files | doc/hg.1.txt mercurial/commands.py |
diffstat | 2 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 <destination>:: Push changes from the local repository to the given destination.
--- 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'),