obscache: drop compat layer to access public changeset
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 19 Apr 2018 14:01:24 +0200
changeset 3688 bda024010aed
parent 3687 50f1968724f0
child 3689 415c872d3308
obscache: drop compat layer to access public changeset We can now access precomputed sets. (compat to 4.1 and 4.2 dropped)
hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py	Thu Apr 19 14:00:12 2018 +0200
+++ b/hgext3rd/evolve/obscache.py	Thu Apr 19 14:01:24 2018 +0200
@@ -429,11 +429,7 @@
     """the set of obsolete revisions"""
     obs = set()
     repo = repo.unfiltered()
-    if util.safehasattr(repo._phasecache, 'getrevset'):
-        notpublic = repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
-    else:
-        # < hg-4.2 compat
-        notpublic = repo.revs("not public()")
+    notpublic = repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
     if notpublic:
         obscache = repo.obsstore.obscache
         # Since we warm the cache at the end of every transaction, the cache