# HG changeset patch # User Martin von Zweigbergk # Date 1607881576 28800 # Node ID aa905c52ede5fba5eac56015a7042b9d41869a19 # Parent a26d4726454f3bb0b50b65e6824514a5e3ae8bb5 compat: handle change to enforcesinglehead() signature 4d5e2fd53707 (singlehead: introduce option to restrict to public changes, 2020-12-05) added a new argument (`filtername`) to the signature. This patch makes us compatible with that. diff -r a26d4726454f -r aa905c52ede5 hgext3rd/evolve/headchecking.py --- a/hgext3rd/evolve/headchecking.py Tue Dec 08 11:58:34 2020 +0800 +++ b/hgext3rd/evolve/headchecking.py Sun Dec 13 09:46:16 2020 -0800 @@ -164,13 +164,17 @@ new_heads.sort() return new_heads -def enforcesinglehead(orig, repo, tr, desc, accountclosed=False): - """check that no named branch has multiple heads""" +def enforcesinglehead(orig, repo, tr, desc, accountclosed, filtername=b'visible'): + """check that no named branch has multiple heads + + COMPAT: this is the same as the upstream version as of c701f616d852, except + for the _filter_obsolete_heads call. + """ nodesummaries = scmutil.nodesummaries if desc in (b'strip', b'repair'): # skip the logic during strip return - visible = repo.filtered(b'visible') + visible = repo.filtered(filtername) # possible improvement: we could restrict the check to affected branch bm = visible.branchmap() cl = repo.changelog