# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1520609495 -3600
#      Fri Mar 09 16:31:35 2018 +0100
# Node ID 9ecb102cd955e075a6a637f1b8d4f5c8e3015751
# Parent  2cdf47e14c30dbdc2ebc0fd498fc0b85205ce2b3
# EXP-Topic push-book-handling
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
9ecb102cd955
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.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -620,8 +620,8 @@ def _pushdiscoverybookmarks(pushop):
         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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to