##// END OF EJS Templates
consolidated url help into urls help topic and added information about path aliases
Bill Barry -
r7693:e040f9d6 default
parent child Browse files
Show More
@@ -589,12 +589,11 b' def clone(ui, source, dest=None, **opts)'
589 If the -U option is used, the new clone will contain only a repository
589 If the -U option is used, the new clone will contain only a repository
590 (.hg) and no working copy (the working copy parent is the null revision).
590 (.hg) and no working copy (the working copy parent is the null revision).
591
591
592 See pull for valid source format details.
592 See 'hg help urls' for valid source format details.
593
593
594 It is possible to specify an ssh:// URL as the destination, but no
594 It is possible to specify an ssh:// URL as the destination, but no
595 .hg/hgrc and working directory will be created on the remote side.
595 .hg/hgrc and working directory will be created on the remote side.
596 Look at the help text for the pull command for important details
596 Look at the help text for urls for important details about ssh:// URLs.
597 about ssh:// URLs.
598 """
597 """
599 cmdutil.setremoteconfig(ui, opts)
598 cmdutil.setremoteconfig(ui, opts)
600 hg.clone(ui, source, dest,
599 hg.clone(ui, source, dest,
@@ -1788,8 +1787,7 b' def init(ui, dest=".", **opts):'
1788 If no directory is given, the current directory is used.
1787 If no directory is given, the current directory is used.
1789
1788
1790 It is possible to specify an ssh:// URL as the destination.
1789 It is possible to specify an ssh:// URL as the destination.
1791 Look at the help text for the pull command for important details
1790 See 'hg help urls' for more information.
1792 about ssh:// URLs.
1793 """
1791 """
1794 cmdutil.setremoteconfig(ui, opts)
1792 cmdutil.setremoteconfig(ui, opts)
1795 hg.repository(ui, dest, create=1)
1793 hg.repository(ui, dest, create=1)
@@ -2117,6 +2115,8 b' def paths(ui, repo, search=None):'
2117 definition of available names.
2115 definition of available names.
2118 Path names are defined in the [paths] section of /etc/mercurial/hgrc
2116 Path names are defined in the [paths] section of /etc/mercurial/hgrc
2119 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
2117 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
2118
2119 See 'hg help urls' for more information.
2120 """
2120 """
2121 if search:
2121 if search:
2122 for name, path in ui.configitems("paths"):
2122 for name, path in ui.configitems("paths"):
@@ -2151,34 +2151,8 b' def pull(ui, repo, source="default", **o'
2151 or URL and adds them to the local repository. By default, this
2151 or URL and adds them to the local repository. By default, this
2152 does not update the copy of the project in the working directory.
2152 does not update the copy of the project in the working directory.
2153
2153
2154 Valid URLs are of the form:
2154 If SOURCE is omitted, the 'default' path will be used.
2155
2155 See 'hg help urls' for more information.
2156 local/filesystem/path (or file://local/filesystem/path)
2157 http://[user[:pass]@]host[:port]/[path]
2158 https://[user[:pass]@]host[:port]/[path]
2159 ssh://[user[:pass]@]host[:port]/[path]
2160
2161 Paths in the local filesystem can either point to Mercurial
2162 repositories or to bundle files (as created by 'hg bundle' or
2163 'hg incoming --bundle').
2164
2165 An optional identifier after # indicates a particular branch, tag,
2166 or changeset to pull.
2167
2168 Some notes about using SSH with Mercurial:
2169 - SSH requires an accessible shell account on the destination machine
2170 and a copy of hg in the remote path or specified with as remotecmd.
2171 - path is relative to the remote user's home directory by default.
2172 Use an extra slash at the start of a path to specify an absolute path:
2173 ssh://example.com//tmp/repository
2174 - Mercurial doesn't use its own compression via SSH; the right thing
2175 to do is to configure it in your ~/.ssh/config, e.g.:
2176 Host *.mylocalnetwork.example.com
2177 Compression no
2178 Host *
2179 Compression yes
2180 Alternatively specify "ssh -C" as your ssh command in your hgrc or
2181 with the --ssh command line option.
2182 """
2156 """
2183 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
2157 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
2184 cmdutil.setremoteconfig(ui, opts)
2158 cmdutil.setremoteconfig(ui, opts)
@@ -2210,22 +2184,12 b' def push(ui, repo, dest=None, **opts):'
2210 increase the number of remote heads. This generally indicates the
2184 increase the number of remote heads. This generally indicates the
2211 the client has forgotten to pull and merge before pushing.
2185 the client has forgotten to pull and merge before pushing.
2212
2186
2213 Valid URLs are of the form:
2187 If -r is used, the named changeset and all its ancestors will be pushed
2214
2188 to the remote repository.
2215 local/filesystem/path (or file://local/filesystem/path)
2189
2216 ssh://[user[:pass]@]host[:port]/[path]
2190 Look at the help text for urls for important details about ssh:// URLs.
2217 http://[user[:pass]@]host[:port]/[path]
2191 If DESTINATION is omitted, a default path will be used.
2218 https://[user[:pass]@]host[:port]/[path]
2192 See 'hg help urls' for more information.
2219
2220 An optional identifier after # indicates a particular branch, tag,
2221 or changeset to push. If -r is used, the named changeset and all its
2222 ancestors will be pushed to the remote repository.
2223
2224 Look at the help text for the pull command for important details
2225 about ssh:// URLs.
2226
2227 Pushing to http:// and https:// URLs is only possible, if this
2228 feature is explicitly enabled on the remote Mercurial server.
2229 """
2193 """
2230 dest, revs, checkout = hg.parseurl(
2194 dest, revs, checkout = hg.parseurl(
2231 ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
2195 ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
@@ -331,4 +331,62 b' PYTHONPATH::'
331 "foo bar" becomes "foo%20bar".
331 "foo bar" becomes "foo%20bar".
332 - user: Any text. Returns the user portion of an email address.
332 - user: Any text. Returns the user portion of an email address.
333 ''')),
333 ''')),
334
335 (['urls'], _('Url Paths'),
336 _(r'''
337 Valid URLs are of the form:
338
339 local/filesystem/path (or file://local/filesystem/path)
340 http://[user[:pass]@]host[:port]/[path]
341 https://[user[:pass]@]host[:port]/[path]
342 ssh://[user[:pass]@]host[:port]/[path]
343
344 Paths in the local filesystem can either point to Mercurial
345 repositories or to bundle files (as created by 'hg bundle' or
346 'hg incoming --bundle').
347
348 An optional identifier after # indicates a particular branch, tag,
349 or changeset to deal with in the remote repository.
350
351 Some features, such as pushing to http:// and https:// URLs are
352 only possible if the feature is explicitly enabled on the
353 remote Mercurial server.
354
355 Some notes about using SSH with Mercurial:
356 - SSH requires an accessible shell account on the destination machine
357 and a copy of hg in the remote path or specified with as remotecmd.
358 - path is relative to the remote user's home directory by default.
359 Use an extra slash at the start of a path to specify an absolute path:
360 ssh://example.com//tmp/repository
361 - Mercurial doesn't use its own compression via SSH; the right thing
362 to do is to configure it in your ~/.ssh/config, e.g.:
363 Host *.mylocalnetwork.example.com
364 Compression no
365 Host *
366 Compression yes
367 Alternatively specify "ssh -C" as your ssh command in your hgrc or
368 with the --ssh command line option.
369
370 These urls can all be stored in your hgrc with path aliases under the
371 [paths] section like so:
372 [paths]
373 alias1 = URL1
374 alias2 = URL2
375 ...
376
377 You can then use the alias for any command that uses a url (for example
378 'hg pull alias1' would pull from the 'alias1' path).
379
380 Two path aliases are more important because they are used as defaults
381 when you do not provide the url to a command:
382
383 default:
384 When you create a repository with hg clone, the clone command saves
385 the location of the source repository as the 'default' path. This is
386 then used when you omit a path from the push and pull commands.
387
388 default-push:
389 The push command will look for a path named 'default-push', and
390 prefer it over 'default' if both are defined.
391 ''')),
334 )
392 )
General Comments 0
You need to be logged in to leave comments. Login now