debugstablerange: cleanly "Abort" when no revision are specified
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 30 May 2017 11:49:00 +0200
changeset 2505 7fd55c5efffb
parent 2504 d95006fe4dd0
child 2506 747dc7067751
debugstablerange: cleanly "Abort" when no revision are specified Previously we had a traceback from a max on an empty sequence.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Tue May 30 11:12:02 2017 +0200
+++ b/hgext3rd/evolve/stablerange.py	Tue May 30 11:49:00 2017 +0200
@@ -196,6 +196,8 @@
     depth = stablerange.depthrev
     length = stablerange.rangelength
     subranges = stablerange.subranges
+    if not revs:
+        raise error.Abort('no revisions specified')
     repo.stablerange.warmup(repo, max(revs))
     if opts['subranges']:
         ranges = subrangesclosure(repo, revs)