Mercurial > public > mercurial-scm > hg-stable
diff mercurial/obsutil.py @ 34294:7cdc8c5a481a
templates: introduce a obsfateoperation() function
Differential Revision: https://phab.mercurial-scm.org/D723
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 15 Sep 2017 10:43:22 -0700 |
parents | 98fa777cd7a1 |
children | 014d467f9d08 |
line wrap: on
line diff
--- a/mercurial/obsutil.py Fri Sep 15 10:42:49 2017 -0700 +++ b/mercurial/obsutil.py Fri Sep 15 10:43:22 2017 -0700 @@ -646,3 +646,12 @@ users = set(meta.get('user') for meta in markersmeta if meta.get('user')) return sorted(users) + +def markersoperations(markers): + """ Returns a sorted list of markers operations without duplicates + """ + markersmeta = [dict(m[3]) for m in markers] + operations = set(meta.get('operation') for meta in markersmeta + if meta.get('operation')) + + return sorted(operations)