Mercurial > evolve
changeset 5676:aa905c52ede5
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 13 Dec 2020 09:46:16 -0800 |
parents | a26d4726454f |
children | 843e1df7912f |
files | hgext3rd/evolve/headchecking.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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