##// END OF EJS Templates
Add -e and --remotecmd for clone and pull too
mpm@selenic.com -
r963:84355e3e default
parent child Browse files
Show More
@@ -99,6 +99,8 b' clone [-U] <source> [dest]::'
99
99
100 options:
100 options:
101 -U, --noupdate do not update the new working directory
101 -U, --noupdate do not update the new working directory
102 -e, --ssh specify ssh command to use
103 --remotecmd specify hg command to run on the remote side
102
104
103 commit [options] [files...]::
105 commit [options] [files...]::
104 Commit changes to the given files into the repository.
106 Commit changes to the given files into the repository.
@@ -295,6 +297,8 b' pull <repository path>::'
295
297
296 options:
298 options:
297 -u, --update update the working directory to tip after pull
299 -u, --update update the working directory to tip after pull
300 -e, --ssh specify ssh command to use
301 --remotecmd specify hg command to run on the remote side
298
302
299 push <destination>::
303 push <destination>::
300 Push changes from the local repository to the given destination.
304 Push changes from the local repository to the given destination.
@@ -489,6 +489,11 b' def clone(ui, source, dest=None, **opts)'
489 if self.dir_:
489 if self.dir_:
490 self.rmtree(self.dir_, True)
490 self.rmtree(self.dir_, True)
491
491
492 if opts['ssh']:
493 ui.setconfig("ui", "ssh", opts['ssh'])
494 if opts['remotecmd']:
495 ui.setconfig("ui", "remotecmd", opts['remotecmd'])
496
492 d = Dircleanup(dest)
497 d = Dircleanup(dest)
493 abspath = source
498 abspath = source
494 source = ui.expandpath(source)
499 source = ui.expandpath(source)
@@ -916,6 +921,11 b' def pull(ui, repo, source="default", **o'
916 source = ui.expandpath(source)
921 source = ui.expandpath(source)
917 ui.status('pulling from %s\n' % (source))
922 ui.status('pulling from %s\n' % (source))
918
923
924 if opts['ssh']:
925 ui.setconfig("ui", "ssh", opts['ssh'])
926 if opts['remotecmd']:
927 ui.setconfig("ui", "remotecmd", opts['remotecmd'])
928
919 other = hg.repository(ui, source)
929 other = hg.repository(ui, source)
920 r = repo.pull(other)
930 r = repo.pull(other)
921 if not r:
931 if not r:
@@ -1270,8 +1280,10 b' table = {'
1270 'hg cat [-o OUTFILE] FILE [REV]'),
1280 'hg cat [-o OUTFILE] FILE [REV]'),
1271 "^clone":
1281 "^clone":
1272 (clone,
1282 (clone,
1273 [('U', 'noupdate', None, 'skip update after cloning')],
1283 [('U', 'noupdate', None, 'skip update after cloning'),
1274 'hg clone [-U] SOURCE [DEST]'),
1284 ('e', 'ssh', "", 'ssh command'),
1285 ('', 'remotecmd', "", 'remote hg command')],
1286 'hg clone [OPTIONS] SOURCE [DEST]'),
1275 "^commit|ci":
1287 "^commit|ci":
1276 (commit,
1288 (commit,
1277 [('A', 'addremove', None, 'run add/remove during commit'),
1289 [('A', 'addremove', None, 'run add/remove during commit'),
@@ -1340,8 +1352,10 b' table = {'
1340 "paths": (paths, [], 'hg paths [NAME]'),
1352 "paths": (paths, [], 'hg paths [NAME]'),
1341 "^pull":
1353 "^pull":
1342 (pull,
1354 (pull,
1343 [('u', 'update', None, 'update working directory')],
1355 [('u', 'update', None, 'update working directory'),
1344 'hg pull [-u] [SOURCE]'),
1356 ('e', 'ssh', "", 'ssh command'),
1357 ('', 'remotecmd', "", 'remote hg command')],
1358 'hg pull [OPTIONS] [SOURCE]'),
1345 "^push":
1359 "^push":
1346 (push,
1360 (push,
1347 [('f', 'force', None, 'force push'),
1361 [('f', 'force', None, 'force push'),
General Comments 0
You need to be logged in to leave comments. Login now