mercurial/commands.py
changeset 18997 4cf09a1bf5b2
parent 18996 160d8416e286
child 19025 3af92401efb3
equal deleted inserted replaced
18996:160d8416e286 18997:4cf09a1bf5b2
  5462                  (new, len(bheads)))
  5462                  (new, len(bheads)))
  5463 
  5463 
  5464     if opts.get('remote'):
  5464     if opts.get('remote'):
  5465         t = []
  5465         t = []
  5466         source, branches = hg.parseurl(ui.expandpath('default'))
  5466         source, branches = hg.parseurl(ui.expandpath('default'))
       
  5467         sbranch = branches[0]
  5467         other = hg.peer(repo, {}, source)
  5468         other = hg.peer(repo, {}, source)
  5468         revs, checkout = hg.addbranchrevs(repo, other, branches,
  5469         revs, checkout = hg.addbranchrevs(repo, other, branches,
  5469                                           opts.get('rev'))
  5470                                           opts.get('rev'))
  5470         if revs:
  5471         if revs:
  5471             revs = [other.lookup(rev) for rev in revs]
  5472             revs = [other.lookup(rev) for rev in revs]
  5476         repo.ui.popbuffer()
  5477         repo.ui.popbuffer()
  5477         if incoming:
  5478         if incoming:
  5478             t.append(_('1 or more incoming'))
  5479             t.append(_('1 or more incoming'))
  5479 
  5480 
  5480         dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
  5481         dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
       
  5482         dbranch = branches[0]
  5481         revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
  5483         revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
  5482         if source != dest:
  5484         if source != dest:
  5483             other = hg.peer(repo, {}, dest)
  5485             other = hg.peer(repo, {}, dest)
       
  5486             ui.debug('comparing with %s\n' % util.hidepassword(dest))
       
  5487         if (source != dest or (sbranch is not None and sbranch != dbranch)):
  5484             commoninc = None
  5488             commoninc = None
  5485             ui.debug('comparing with %s\n' % util.hidepassword(dest))
       
  5486         if revs:
  5489         if revs:
  5487             revs = [repo.lookup(rev) for rev in revs]
  5490             revs = [repo.lookup(rev) for rev in revs]
  5488         repo.ui.pushbuffer()
  5491         repo.ui.pushbuffer()
  5489         outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs,
  5492         outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs,
  5490                                                 commoninc=commoninc)
  5493                                                 commoninc=commoninc)