Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 20819:202291a280fb
revpair: drop useless conditional
The `if not revs:` case is tested at the beginning of the function.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 20 Mar 2014 17:34:02 -0700 |
parents | 170d6d591a7d |
children | f8e531a3a77c |
comparison
equal
deleted
inserted
replaced
20818:c7d543eebe1a | 20819:202291a280fb |
---|---|
469 return repo.dirstate.p1(), None | 469 return repo.dirstate.p1(), None |
470 | 470 |
471 l = revrange(repo, revs) | 471 l = revrange(repo, revs) |
472 | 472 |
473 if len(l) == 0: | 473 if len(l) == 0: |
474 if revs: | 474 raise util.Abort(_('empty revision range')) |
475 raise util.Abort(_('empty revision range')) | |
476 return repo.dirstate.p1(), None | |
477 | 475 |
478 if len(l) == 1 and len(revs) == 1 and _revrangesep not in revs[0]: | 476 if len(l) == 1 and len(revs) == 1 and _revrangesep not in revs[0]: |
479 return repo.lookup(l[0]), None | 477 return repo.lookup(l[0]), None |
480 | 478 |
481 return repo.lookup(l[0]), repo.lookup(l[-1]) | 479 return repo.lookup(l[0]), repo.lookup(l[-1]) |