587 This option implies --pull, even on local repositories. |
587 This option implies --pull, even on local repositories. |
588 |
588 |
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, |
601 pull=opts.get('pull'), |
600 pull=opts.get('pull'), |
602 stream=opts.get('uncompressed'), |
601 stream=opts.get('uncompressed'), |
1786 directory does not exist, it is created. |
1785 directory does not exist, it is created. |
1787 |
1786 |
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) |
1796 |
1794 |
1797 def locate(ui, repo, *pats, **opts): |
1795 def locate(ui, repo, *pats, **opts): |
2115 |
2113 |
2116 Show definition of symbolic path name NAME. If no name is given, show |
2114 Show definition of symbolic path name NAME. If no name is given, show |
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"): |
2123 if name == search: |
2123 if name == search: |
2124 ui.write("%s\n" % url.hidepassword(path)) |
2124 ui.write("%s\n" % url.hidepassword(path)) |
2149 |
2149 |
2150 This finds all changes from the repository at the specified path |
2150 This finds all changes from the repository at the specified path |
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) |
2185 |
2159 |
2186 other = hg.repository(ui, source) |
2160 other = hg.repository(ui, source) |
2208 |
2182 |
2209 By default, push will refuse to run if it detects the result would |
2183 By default, push will refuse to run if it detects the result would |
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')) |
2232 cmdutil.setremoteconfig(ui, opts) |
2196 cmdutil.setremoteconfig(ui, opts) |
2233 |
2197 |