mercurial/commands.py
changeset 44831 6d3768b11241
parent 44823 3b7aabd02e11
child 44849 f90957c947f4
equal deleted inserted replaced
44823:3b7aabd02e11 44831:6d3768b11241
  2487         ctx2 = scmutil.revsingle(repo, change, None)
  2487         ctx2 = scmutil.revsingle(repo, change, None)
  2488         ctx1 = ctx2.p1()
  2488         ctx1 = ctx2.p1()
  2489     else:
  2489     else:
  2490         repo = scmutil.unhidehashlikerevs(repo, revs, b'nowarn')
  2490         repo = scmutil.unhidehashlikerevs(repo, revs, b'nowarn')
  2491         ctx1, ctx2 = scmutil.revpair(repo, revs)
  2491         ctx1, ctx2 = scmutil.revpair(repo, revs)
  2492     node1, node2 = ctx1.node(), ctx2.node()
       
  2493 
  2492 
  2494     if reverse:
  2493     if reverse:
  2495         node1, node2 = node2, node1
  2494         ctxleft = ctx2
       
  2495         ctxright = ctx1
       
  2496     else:
       
  2497         ctxleft = ctx1
       
  2498         ctxright = ctx2
  2496 
  2499 
  2497     diffopts = patch.diffallopts(ui, opts)
  2500     diffopts = patch.diffallopts(ui, opts)
  2498     m = scmutil.match(ctx2, pats, opts)
  2501     m = scmutil.match(ctx2, pats, opts)
  2499     m = repo.narrowmatch(m)
  2502     m = repo.narrowmatch(m)
  2500     ui.pager(b'diff')
  2503     ui.pager(b'diff')
  2501     logcmdutil.diffordiffstat(
  2504     logcmdutil.diffordiffstat(
  2502         ui,
  2505         ui,
  2503         repo,
  2506         repo,
  2504         diffopts,
  2507         diffopts,
  2505         repo[node1],
  2508         ctxleft,
  2506         repo[node2],
  2509         ctxright,
  2507         m,
  2510         m,
  2508         stat=stat,
  2511         stat=stat,
  2509         listsubrepos=opts.get(b'subrepos'),
  2512         listsubrepos=opts.get(b'subrepos'),
  2510         root=opts.get(b'root'),
  2513         root=opts.get(b'root'),
  2511     )
  2514     )