Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 2473:30c267cb4c2f
change some repo messages in small ways.
move "pushing" and "pulling" after repo create so error message and exit
happens before messages printed.
fix sshrepo parse error message.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 21 Jun 2006 09:15:42 -0700 |
parents | ff9ee834e3b6 |
children | 0f7e4a39d9af |
comparison
equal
deleted
inserted
replaced
2472:e6ec81a8feea | 2473:30c267cb4c2f |
---|---|
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 |