mercurial/commands.py
changeset 1965 62aa1b90414f
parent 1959 d53a18f592be
child 1966 f8b0e73e320f
equal deleted inserted replaced
1964:778281d46bb2 1965:62aa1b90414f
  1763 
  1763 
  1764     For remote repository, using --bundle avoids downloading the changesets
  1764     For remote repository, using --bundle avoids downloading the changesets
  1765     twice if the incoming is followed by a pull.
  1765     twice if the incoming is followed by a pull.
  1766     """
  1766     """
  1767     source = ui.expandpath(source)
  1767     source = ui.expandpath(source)
       
  1768     if opts['ssh']:
       
  1769         ui.setconfig("ui", "ssh", opts['ssh'])
       
  1770     if opts['remotecmd']:
       
  1771         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
       
  1772 
  1768     other = hg.repository(ui, source)
  1773     other = hg.repository(ui, source)
  1769     incoming = repo.findincoming(other, force=opts["force"])
  1774     incoming = repo.findincoming(other, force=opts["force"])
  1770     if not incoming:
  1775     if not incoming:
  1771         return
  1776         return
  1772 
  1777 
  1975     if a push was requested.
  1980     if a push was requested.
  1976 
  1981 
  1977     See pull for valid source format details.
  1982     See pull for valid source format details.
  1978     """
  1983     """
  1979     dest = ui.expandpath(dest)
  1984     dest = ui.expandpath(dest)
       
  1985     if opts['ssh']:
       
  1986         ui.setconfig("ui", "ssh", opts['ssh'])
       
  1987     if opts['remotecmd']:
       
  1988         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
       
  1989 
  1980     other = hg.repository(ui, dest)
  1990     other = hg.repository(ui, dest)
  1981     o = repo.findoutgoing(other, force=opts['force'])
  1991     o = repo.findoutgoing(other, force=opts['force'])
  1982     o = repo.changelog.nodesbetween(o)[0]
  1992     o = repo.changelog.nodesbetween(o)[0]
  1983     if opts['newest_first']:
  1993     if opts['newest_first']:
  1984         o.reverse()
  1994         o.reverse()
  2762            _('run even when remote repository is unrelated')),
  2772            _('run even when remote repository is unrelated')),
  2763           ('', 'style', '', _('display using template map file')),
  2773           ('', 'style', '', _('display using template map file')),
  2764           ('n', 'newest-first', None, _('show newest record first')),
  2774           ('n', 'newest-first', None, _('show newest record first')),
  2765           ('', 'bundle', '', _('file to store the bundles into')),
  2775           ('', 'bundle', '', _('file to store the bundles into')),
  2766           ('p', 'patch', None, _('show patch')),
  2776           ('p', 'patch', None, _('show patch')),
  2767           ('', 'template', '', _('display with template'))],
  2777           ('', 'template', '', _('display with template')),
       
  2778           ('e', 'ssh', '', _('specify ssh command to use')),
       
  2779           ('', 'remotecmd', '',
       
  2780            _('specify hg command to run on the remote side'))],
  2768          _('hg incoming [-p] [-n] [-M] [--bundle FILENAME] [SOURCE]')),
  2781          _('hg incoming [-p] [-n] [-M] [--bundle FILENAME] [SOURCE]')),
  2769     "^init": (init, [], _('hg init [DEST]')),
  2782     "^init": (init, [], _('hg init [DEST]')),
  2770     "locate":
  2783     "locate":
  2771         (locate,
  2784         (locate,
  2772          [('r', 'rev', '', _('search the repository as it stood at rev')),
  2785          [('r', 'rev', '', _('search the repository as it stood at rev')),
  2797           ('f', 'force', None,
  2810           ('f', 'force', None,
  2798            _('run even when remote repository is unrelated')),
  2811            _('run even when remote repository is unrelated')),
  2799           ('p', 'patch', None, _('show patch')),
  2812           ('p', 'patch', None, _('show patch')),
  2800           ('', 'style', '', _('display using template map file')),
  2813           ('', 'style', '', _('display using template map file')),
  2801           ('n', 'newest-first', None, _('show newest record first')),
  2814           ('n', 'newest-first', None, _('show newest record first')),
  2802           ('', 'template', '', _('display with template'))],
  2815           ('', 'template', '', _('display with template')),
       
  2816           ('e', 'ssh', '', _('specify ssh command to use')),
       
  2817           ('', 'remotecmd', '',
       
  2818            _('specify hg command to run on the remote side'))],
  2803          _('hg outgoing [-M] [-p] [-n] [DEST]')),
  2819          _('hg outgoing [-M] [-p] [-n] [DEST]')),
  2804     "^parents":
  2820     "^parents":
  2805         (parents,
  2821         (parents,
  2806          [('b', 'branches', None, _('show branches')),
  2822          [('b', 'branches', None, _('show branches')),
  2807           ('', 'style', '', _('display using template map file')),
  2823           ('', 'style', '', _('display using template map file')),