comparison hgext/extdiff.py @ 48117:b74e128676d4

errors: raise InputError from revpair() iff revset provided by the user Same reasoning as for `revrange()` in an earlier patch. Differential Revision: https://phab.mercurial-scm.org/D11561
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Sep 2021 13:59:01 -0700
parents 728d89f6f9b1
children 5105a9975407
comparison
equal deleted inserted replaced
48116:5ced12cfa41b 48117:b74e128676d4
99 cmdutil, 99 cmdutil,
100 encoding, 100 encoding,
101 error, 101 error,
102 filemerge, 102 filemerge,
103 formatter, 103 formatter,
104 logcmdutil,
104 pycompat, 105 pycompat,
105 registrar, 106 registrar,
106 scmutil, 107 scmutil,
107 util, 108 util,
108 ) 109 )
566 ) 567 )
567 ctx1a = scmutil.revsingle(repo, from_rev, None) 568 ctx1a = scmutil.revsingle(repo, from_rev, None)
568 ctx1b = repo[nullrev] 569 ctx1b = repo[nullrev]
569 ctx2 = scmutil.revsingle(repo, to_rev, None) 570 ctx2 = scmutil.revsingle(repo, to_rev, None)
570 else: 571 else:
571 ctx1a, ctx2 = scmutil.revpair(repo, revs) 572 ctx1a, ctx2 = logcmdutil.revpair(repo, revs)
572 if not revs: 573 if not revs:
573 ctx1b = repo[None].p2() 574 ctx1b = repo[None].p2()
574 else: 575 else:
575 ctx1b = repo[nullrev] 576 ctx1b = repo[nullrev]
576 577