comparison mercurial/commands.py @ 2590:911b56853fdd

Additional information about URLs in pull/push/clone/init: - clone to ssh:// - init via ssh:// - example for pull from an absolute directory via ssh:// - push to http:// and https://
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 11 Jul 2006 22:36:52 +0200
parents dc63db82b530
children 5ba8be56fa8f
comparison
equal deleted inserted replaced
2589:dc63db82b530 2590:911b56853fdd
949 such as AFS, implement hardlinking incorrectly, but do not report 949 such as AFS, implement hardlinking incorrectly, but do not report
950 errors. In these cases, use the --pull option to avoid 950 errors. In these cases, use the --pull option to avoid
951 hardlinking. 951 hardlinking.
952 952
953 See pull for valid source format details. 953 See pull for valid source format details.
954
955 It is possible to specify an ssh:// URL as the destination, but no
956 .hg/hgrc will be created on the remote side. Look at the help text
957 for the pull command for important details about ssh:// URLs.
954 """ 958 """
955 if dest is None: 959 if dest is None:
956 dest = os.path.basename(os.path.normpath(source)) 960 dest = os.path.basename(os.path.normpath(source))
957 961
958 if os.path.exists(dest): 962 if os.path.exists(dest):
1958 1962
1959 Initialize a new repository in the given directory. If the given 1963 Initialize a new repository in the given directory. If the given
1960 directory does not exist, it is created. 1964 directory does not exist, it is created.
1961 1965
1962 If no directory is given, the current directory is used. 1966 If no directory is given, the current directory is used.
1967
1968 It is possible to specify an ssh:// URL as the destination.
1969 Look at the help text for the pull command for important details
1970 about ssh:// URLs.
1963 """ 1971 """
1964 hg.repository(ui, dest, create=1) 1972 hg.repository(ui, dest, create=1)
1965 1973
1966 def locate(ui, repo, *pats, **opts): 1974 def locate(ui, repo, *pats, **opts):
1967 """locate files matching specific patterns 1975 """locate files matching specific patterns
2234 2242
2235 Some notes about using SSH with Mercurial: 2243 Some notes about using SSH with Mercurial:
2236 - SSH requires an accessible shell account on the destination machine 2244 - SSH requires an accessible shell account on the destination machine
2237 and a copy of hg in the remote path or specified with as remotecmd. 2245 and a copy of hg in the remote path or specified with as remotecmd.
2238 - path is relative to the remote user's home directory by default. 2246 - path is relative to the remote user's home directory by default.
2239 Use a slash at the start of a path to specify an absolute path. 2247 Use an extra slash at the start of a path to specify an absolute path:
2248 ssh://example.com//tmp/repository
2240 - Mercurial doesn't use its own compression via SSH; the right thing 2249 - Mercurial doesn't use its own compression via SSH; the right thing
2241 to do is to configure it in your ~/.ssh/ssh_config, e.g.: 2250 to do is to configure it in your ~/.ssh/ssh_config, e.g.:
2242 Host *.mylocalnetwork.example.com 2251 Host *.mylocalnetwork.example.com
2243 Compression off 2252 Compression off
2244 Host * 2253 Host *
2282 local/filesystem/path 2291 local/filesystem/path
2283 ssh://[user@]host[:port]/[path] 2292 ssh://[user@]host[:port]/[path]
2284 2293
2285 Look at the help text for the pull command for important details 2294 Look at the help text for the pull command for important details
2286 about ssh:// URLs. 2295 about ssh:// URLs.
2296
2297 Pushing to http:// and https:// URLs is possible, too, if this
2298 feature is enabled on the remote Mercurial server.
2287 """ 2299 """
2288 dest = ui.expandpath(dest or 'default-push', dest or 'default') 2300 dest = ui.expandpath(dest or 'default-push', dest or 'default')
2289 2301
2290 if opts['ssh']: 2302 if opts['ssh']:
2291 ui.setconfig("ui", "ssh", opts['ssh']) 2303 ui.setconfig("ui", "ssh", opts['ssh'])