2149 Compression on |
2149 Compression on |
2150 Alternatively specify "ssh -C" as your ssh command in your hgrc or |
2150 Alternatively specify "ssh -C" as your ssh command in your hgrc or |
2151 with the --ssh command line option. |
2151 with the --ssh command line option. |
2152 """ |
2152 """ |
2153 source = ui.expandpath(source) |
2153 source = ui.expandpath(source) |
2154 ui.status(_('pulling from %s\n') % (source)) |
|
2155 |
2154 |
2156 if opts['ssh']: |
2155 if opts['ssh']: |
2157 ui.setconfig("ui", "ssh", opts['ssh']) |
2156 ui.setconfig("ui", "ssh", opts['ssh']) |
2158 if opts['remotecmd']: |
2157 if opts['remotecmd']: |
2159 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2158 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2160 |
2159 |
2161 other = hg.repository(ui, source) |
2160 other = hg.repository(ui, source) |
|
2161 ui.status(_('pulling from %s\n') % (source)) |
2162 revs = None |
2162 revs = None |
2163 if opts['rev'] and not other.local(): |
2163 if opts['rev'] and not other.local(): |
2164 raise util.Abort(_("pull -r doesn't work for remote repositories yet")) |
2164 raise util.Abort(_("pull -r doesn't work for remote repositories yet")) |
2165 elif opts['rev']: |
2165 elif opts['rev']: |
2166 revs = [other.lookup(rev) for rev in opts['rev']] |
2166 revs = [other.lookup(rev) for rev in opts['rev']] |
2188 |
2188 |
2189 Look at the help text for the pull command for important details |
2189 Look at the help text for the pull command for important details |
2190 about ssh:// URLs. |
2190 about ssh:// URLs. |
2191 """ |
2191 """ |
2192 dest = ui.expandpath(dest) |
2192 dest = ui.expandpath(dest) |
2193 ui.status('pushing to %s\n' % (dest)) |
|
2194 |
2193 |
2195 if opts['ssh']: |
2194 if opts['ssh']: |
2196 ui.setconfig("ui", "ssh", opts['ssh']) |
2195 ui.setconfig("ui", "ssh", opts['ssh']) |
2197 if opts['remotecmd']: |
2196 if opts['remotecmd']: |
2198 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2197 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2199 |
2198 |
2200 other = hg.repository(ui, dest) |
2199 other = hg.repository(ui, dest) |
|
2200 ui.status('pushing to %s\n' % (dest)) |
2201 revs = None |
2201 revs = None |
2202 if opts['rev']: |
2202 if opts['rev']: |
2203 revs = [repo.lookup(rev) for rev in opts['rev']] |
2203 revs = [repo.lookup(rev) for rev in opts['rev']] |
2204 r = repo.push(other, opts['force'], revs=revs) |
2204 r = repo.push(other, opts['force'], revs=revs) |
2205 return r == 0 |
2205 return r == 0 |