push-discovery: don't turn use generator when comparing bookmarks
authorBoris Feld <boris.feld@octobus.net>
Fri, 09 Mar 2018 16:31:35 +0100
changeset 36937 cc51b6a07869
parent 36936 a2baa61bbb14
child 36938 8fd9b56e8d7c
push-discovery: don't turn use generator when comparing bookmarks We want extensions to be able to implement their own logic. Generators can be consume only once, impractical for this purpose.
mercurial/exchange.py
--- a/mercurial/exchange.py	Tue Mar 13 16:56:13 2018 -0700
+++ b/mercurial/exchange.py	Fri Mar 09 16:31:35 2018 +0100
@@ -620,8 +620,8 @@
         return hex(x)
 
     def hexifycompbookmarks(bookmarks):
-        for b, scid, dcid in bookmarks:
-            yield b, safehex(scid), safehex(dcid)
+        return [(b, safehex(scid), safehex(dcid))
+                for (b, scid, dcid) in bookmarks]
 
     comp = [hexifycompbookmarks(marks) for marks in comp]
     addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = comp