hgsql: disable conflicting features explicitly

Summary:
If hgsql is enabled, disable visibility and narrow-heads explicitly to avoid
surprises.

Reviewed By: markbt

Differential Revision: D21894320

fbshipit-source-id: 335cf92dc1c62e2801e7407b706f6fc5dd59d5b4
This commit is contained in:
Jun Wu 2020-06-05 11:51:20 -07:00 committed by Facebook GitHub Bot
parent ae58e90f07
commit 64585a5895

View File

@ -170,6 +170,16 @@ def cansyncwithsql(repo):
def uisetup(ui):
# hgsql is incompatible with visibleheads - hgsql always wants all heads.
ui.setconfig("visibility", "enabled", "false", "hgsql")
# hgsql is incompatible with narrow-heads - hgsql always wants all heads.
ui.setconfig("experimental", "narrow-heads", "false", "hgsql")
# hgsql wants the legacy revlog access for changelog.
ui.setconfig("experimental", "rust-commits-changelog", "false", "hgsql")
# hgsql does not want any kind of filtering - everything is public.
ui.setconfig("mutation", "enabled", "false", "hgsql")
ui.setconfig("experimental", "evolution", "obsolete", "hgsql")
if ishgsqlbypassed(ui):
return