mercurial/commands.py
changeset 5236 cbe6e263357b
parent 5168 64888ff907f4
child 5238 20817af258d8
equal deleted inserted replaced
5235:8ede77c2d008 5236:cbe6e263357b
   322                     if p not in seen:
   322                     if p not in seen:
   323                         seen[p] = 1
   323                         seen[p] = 1
   324                         visit.append(p)
   324                         visit.append(p)
   325     else:
   325     else:
   326         cmdutil.setremoteconfig(ui, opts)
   326         cmdutil.setremoteconfig(ui, opts)
   327         dest, revs = cmdutil.parseurl(
   327         dest, revs, checkout = cmdutil.parseurl(
   328             ui.expandpath(dest or 'default-push', dest or 'default'), revs)
   328             ui.expandpath(dest or 'default-push', dest or 'default'), revs)
   329         other = hg.repository(ui, dest)
   329         other = hg.repository(ui, dest)
   330         o = repo.findoutgoing(other, force=opts['force'])
   330         o = repo.findoutgoing(other, force=opts['force'])
   331 
   331 
   332     if revs:
   332     if revs:
  1489     hexfunc = ui.debugflag and hex or short
  1489     hexfunc = ui.debugflag and hex or short
  1490     default = not (num or id or branch or tags)
  1490     default = not (num or id or branch or tags)
  1491     output = []
  1491     output = []
  1492 
  1492 
  1493     if source:
  1493     if source:
  1494         source, revs = cmdutil.parseurl(ui.expandpath(source), [])
  1494         source, revs, checkout = cmdutil.parseurl(ui.expandpath(source), [])
  1495         srepo = hg.repository(ui, source)
  1495         srepo = hg.repository(ui, source)
  1496         if not rev and revs:
  1496         if not rev and revs:
  1497             rev = revs[0]
  1497             rev = revs[0]
  1498         if not rev:
  1498         if not rev:
  1499             rev = "tip"
  1499             rev = "tip"
  1647     For remote repository, using --bundle avoids downloading the changesets
  1647     For remote repository, using --bundle avoids downloading the changesets
  1648     twice if the incoming is followed by a pull.
  1648     twice if the incoming is followed by a pull.
  1649 
  1649 
  1650     See pull for valid source format details.
  1650     See pull for valid source format details.
  1651     """
  1651     """
  1652     source, revs = cmdutil.parseurl(ui.expandpath(source), opts['rev'])
  1652     source, revs, checkout = cmdutil.parseurl(ui.expandpath(source),
       
  1653                                               opts['rev'])
  1653     cmdutil.setremoteconfig(ui, opts)
  1654     cmdutil.setremoteconfig(ui, opts)
  1654 
  1655 
  1655     other = hg.repository(ui, source)
  1656     other = hg.repository(ui, source)
  1656     ui.status(_('comparing with %s\n') % source)
  1657     ui.status(_('comparing with %s\n') % source)
  1657     if revs:
  1658     if revs:
  1950     the default push location. These are the changesets that would be pushed
  1951     the default push location. These are the changesets that would be pushed
  1951     if a push was requested.
  1952     if a push was requested.
  1952 
  1953 
  1953     See pull for valid destination format details.
  1954     See pull for valid destination format details.
  1954     """
  1955     """
  1955     dest, revs = cmdutil.parseurl(
  1956     dest, revs, checkout = cmdutil.parseurl(
  1956         ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
  1957         ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
  1957     cmdutil.setremoteconfig(ui, opts)
  1958     cmdutil.setremoteconfig(ui, opts)
  1958     if revs:
  1959     if revs:
  1959         revs = [repo.lookup(rev) for rev in revs]
  1960         revs = [repo.lookup(rev) for rev in revs]
  1960 
  1961 
  2072         Host *
  2073         Host *
  2073           Compression yes
  2074           Compression yes
  2074       Alternatively specify "ssh -C" as your ssh command in your hgrc or
  2075       Alternatively specify "ssh -C" as your ssh command in your hgrc or
  2075       with the --ssh command line option.
  2076       with the --ssh command line option.
  2076     """
  2077     """
  2077     source, revs = cmdutil.parseurl(ui.expandpath(source), opts['rev'])
  2078     source, revs, checkout = cmdutil.parseurl(ui.expandpath(source),
       
  2079                                               opts['rev'])
  2078     cmdutil.setremoteconfig(ui, opts)
  2080     cmdutil.setremoteconfig(ui, opts)
  2079 
  2081 
  2080     other = hg.repository(ui, source)
  2082     other = hg.repository(ui, source)
  2081     ui.status(_('pulling from %s\n') % (source))
  2083     ui.status(_('pulling from %s\n') % (source))
  2082     if revs:
  2084     if revs:
  2117     about ssh:// URLs.
  2119     about ssh:// URLs.
  2118 
  2120 
  2119     Pushing to http:// and https:// URLs is only possible, if this
  2121     Pushing to http:// and https:// URLs is only possible, if this
  2120     feature is explicitly enabled on the remote Mercurial server.
  2122     feature is explicitly enabled on the remote Mercurial server.
  2121     """
  2123     """
  2122     dest, revs = cmdutil.parseurl(
  2124     dest, revs, checkout = cmdutil.parseurl(
  2123         ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
  2125         ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev'])
  2124     cmdutil.setremoteconfig(ui, opts)
  2126     cmdutil.setremoteconfig(ui, opts)
  2125 
  2127 
  2126     other = hg.repository(ui, dest)
  2128     other = hg.repository(ui, dest)
  2127     ui.status('pushing to %s\n' % (dest))
  2129     ui.status('pushing to %s\n' % (dest))