# HG changeset patch # User Boris Feld # Date 2017-10-18 13:38:51 # Node ID aa849cf5d089d9de7cb02b53b1c1667d4a0fbc81 # Parent 29f52e7966dd646ffa75ab65946ef2030017f72b obsfate: fix obsfate_printer with empty date list When the list of dates is empty, `min` and `max` would raises a ValueError. Protect against this case by checking that the date list is not empty. I didn't add a test because I couldn't find a reproducing test case. diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py --- a/mercurial/obsutil.py +++ b/mercurial/obsutil.py @@ -822,7 +822,7 @@ def obsfateprinter(successors, markers, # Date dates = markersdates(markers) - if verbose: + if dates and verbose: min_date = min(dates) max_date = max(dates)