changeset 5205:240efc3ab4dd stable

exchange: deal with empty obscommon The case can happen, we better support it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 11 Mar 2020 18:50:39 +0100
parents c0b8804066dc
children dc3571a37b56
files CHANGELOG hgext3rd/evolve/obsexchange.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Fri Mar 06 02:42:03 2020 +0100
+++ b/CHANGELOG	Wed Mar 11 18:50:39 2020 +0100
@@ -5,6 +5,8 @@
 -------------------
 
   * obsexchange: avoid sending too large request to http server
+  * obsdiscovery: server no longer aborts with a 500 error if client sends a
+    request without obscommon
 
 9.3.0 -- 2020-03-04
 -------------------
--- a/hgext3rd/evolve/obsexchange.py	Fri Mar 06 02:42:03 2020 +0100
+++ b/hgext3rd/evolve/obsexchange.py	Wed Mar 11 18:50:39 2020 +0100
@@ -106,8 +106,10 @@
             if heads is None:
                 heads = repo.heads()
             obscommon = kwargs.get('evo_obscommon', ())
-            assert obscommon
-            obsset = repo.unfiltered().set(b'::%ln - ::%ln', heads, obscommon)
+            if obscommon:
+                obsset = repo.unfiltered().set(b'::%ln - ::%ln', heads, obscommon)
+            else:
+                obsset = repo.unfiltered().set(b'::%ln', heads)
             subset = [c.node() for c in obsset]
         else:
             common = kwargs.get('common')