exchange: deal with empty obscommon
The case can happen, we better support it.
--- 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')