Mercurial > hg
comparison mercurial/commands.py @ 1979:d545fa1426b9
More detailed documentation about ssh:// URLs; fixes issue170.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 20 Mar 2006 17:14:58 +0100 |
parents | 0d54675cd566 |
children | dfb796786337 |
comparison
equal
deleted
inserted
replaced
1978:10606ee61107 | 1979:d545fa1426b9 |
---|---|
1775 repo.commit(files, message, user) | 1775 repo.commit(files, message, user) |
1776 | 1776 |
1777 def incoming(ui, repo, source="default", **opts): | 1777 def incoming(ui, repo, source="default", **opts): |
1778 """show new changesets found in source | 1778 """show new changesets found in source |
1779 | 1779 |
1780 Show new changesets found in the specified repo or the default | 1780 Show new changesets found in the specified path/URL or the default |
1781 pull repo. These are the changesets that would be pulled if a pull | 1781 pull location. These are the changesets that would be pulled if a pull |
1782 was requested. | 1782 was requested. |
1783 | 1783 |
1784 For remote repository, using --bundle avoids downloading the changesets | 1784 For remote repository, using --bundle avoids downloading the changesets |
1785 twice if the incoming is followed by a pull. | 1785 twice if the incoming is followed by a pull. |
1786 | |
1787 See pull for valid source format details. | |
1786 """ | 1788 """ |
1787 source = ui.expandpath(source) | 1789 source = ui.expandpath(source) |
1788 if opts['ssh']: | 1790 if opts['ssh']: |
1789 ui.setconfig("ui", "ssh", opts['ssh']) | 1791 ui.setconfig("ui", "ssh", opts['ssh']) |
1790 if opts['remotecmd']: | 1792 if opts['remotecmd']: |
1989 ui.write("%40s %3s %s\n" % (hex(m[f]), mf[f] and "755" or "644", f)) | 1991 ui.write("%40s %3s %s\n" % (hex(m[f]), mf[f] and "755" or "644", f)) |
1990 | 1992 |
1991 def outgoing(ui, repo, dest="default-push", **opts): | 1993 def outgoing(ui, repo, dest="default-push", **opts): |
1992 """show changesets not found in destination | 1994 """show changesets not found in destination |
1993 | 1995 |
1994 Show changesets not found in the specified destination repo or the | 1996 Show changesets not found in the specified destination repository or |
1995 default push repo. These are the changesets that would be pushed | 1997 the default push location. These are the changesets that would be pushed |
1996 if a push was requested. | 1998 if a push was requested. |
1997 | 1999 |
1998 See pull for valid source format details. | 2000 See pull for valid destination format details. |
1999 """ | 2001 """ |
2000 dest = ui.expandpath(dest) | 2002 dest = ui.expandpath(dest) |
2001 if opts['ssh']: | 2003 if opts['ssh']: |
2002 ui.setconfig("ui", "ssh", opts['ssh']) | 2004 ui.setconfig("ui", "ssh", opts['ssh']) |
2003 if opts['remotecmd']: | 2005 if opts['remotecmd']: |
2071 local/filesystem/path | 2073 local/filesystem/path |
2072 http://[user@]host[:port][/path] | 2074 http://[user@]host[:port][/path] |
2073 https://[user@]host[:port][/path] | 2075 https://[user@]host[:port][/path] |
2074 ssh://[user@]host[:port][/path] | 2076 ssh://[user@]host[:port][/path] |
2075 | 2077 |
2076 SSH requires an accessible shell account on the destination machine | 2078 Some notes about using SSH with Mercurial: |
2077 and a copy of hg in the remote path. With SSH, paths are relative | 2079 - SSH requires an accessible shell account on the destination machine |
2078 to the remote user's home directory by default; use two slashes at | 2080 and a copy of hg in the remote path or specified with as remotecmd. |
2079 the start of a path to specify it as relative to the filesystem root. | 2081 - /path is relative to the remote user's home directory by default. |
2082 Use two slashes at the start of a path to specify an absolute path. | |
2083 - Mercurial doesn't use its own compression via SSH; the right thing | |
2084 to do is to configure it in your ~/.ssh/ssh_config, e.g.: | |
2085 Host *.mylocalnetwork.example.com | |
2086 Compression off | |
2087 Host * | |
2088 Compression on | |
2089 Alternatively specify "ssh -C" as your ssh command in your hgrc or | |
2090 with the --ssh command line option. | |
2080 """ | 2091 """ |
2081 source = ui.expandpath(source) | 2092 source = ui.expandpath(source) |
2082 ui.status(_('pulling from %s\n') % (source)) | 2093 ui.status(_('pulling from %s\n') % (source)) |
2083 | 2094 |
2084 if opts['ssh']: | 2095 if opts['ssh']: |
2118 Valid URLs are of the form: | 2129 Valid URLs are of the form: |
2119 | 2130 |
2120 local/filesystem/path | 2131 local/filesystem/path |
2121 ssh://[user@]host[:port][/path] | 2132 ssh://[user@]host[:port][/path] |
2122 | 2133 |
2123 SSH requires an accessible shell account on the destination | 2134 Look at the help text for the pull command for important details |
2124 machine and a copy of hg in the remote path. | 2135 about ssh:// URLs. |
2125 """ | 2136 """ |
2126 dest = ui.expandpath(dest) | 2137 dest = ui.expandpath(dest) |
2127 ui.status('pushing to %s\n' % (dest)) | 2138 ui.status('pushing to %s\n' % (dest)) |
2128 | 2139 |
2129 if opts['ssh']: | 2140 if opts['ssh']: |