evolve: drop old obsmarker discovery code
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 27 Aug 2014 17:12:01 +0200
changeset 1079 e8f49b32e95b
parent 1078 5717d023da63
child 1080 41d2555141ea
evolve: drop old obsmarker discovery code It as not caller anymore.
hgext/evolve.py
--- a/hgext/evolve.py	Wed Aug 27 17:09:36 2014 +0200
+++ b/hgext/evolve.py	Wed Aug 27 17:12:01 2014 +0200
@@ -2406,46 +2406,6 @@
             yield d
             d = self.read(4096)
 
-def _obsmarkersdiscovery(pushop):
-    """return the list of marker that needs to be pushed to the server
-
-    When used before (or at the same time) the changegroup have been pushed, it
-    returns the value as if the planned changegroup was succesful. Othewise it
-    use te actual common heads to decide whats needs to be pushed.
-    """
-    repo = pushop.repo
-    remote = pushop.remote
-    unfi = repo.unfiltered()
-    cl = unfi.changelog
-    commonheads = pushop.commonheads
-    if commonheads is None:
-        if pushop.revs is None:
-            commonheads = pushop.outgoing.commonheads
-            sch = set(commonheads)
-            commonheads.extend(h for h in pushop.outgoing.missingheads
-                               if h not in sch)
-        else:
-            commonheads = pushop.outgoing.missingheads
-    if (obsolete._enabled and repo.obsstore and
-        'obsolete' in remote.listkeys('namespaces')):
-        obsexcmsg(repo.ui, "computing relevant nodes\n")
-        revs = unfi.revs('::%ln', commonheads)
-        common = []
-        if remote.capable('_evoext_obshash_0'):
-            obsexcmsg(repo.ui, "looking for common markers in %i nodes\n"
-                               % len(revs))
-            common = findcommonobsmarkers(pushop.ui, unfi, remote, revs)
-            revs = list(unfi.revs('%ld - (::%ln)', revs, common))
-        nodes = [cl.node(r) for r in revs]
-        if nodes:
-            obsexcmsg(repo.ui, "computing markers relevant to %i nodes\n"
-                               % len(nodes))
-            markers = repo.obsstore.relevantmarkers(nodes)
-        else:
-            obsexcmsg(repo.ui, "markers already in sync\n")
-            markers = []
-        return markers
-
 @eh.wrapfunction(exchange, '_pushobsolete')
 def _pushobsolete(orig, pushop):
     """utility function to push obsolete markers to a remote"""