I am working on Hg python hook.These hooks are currently running on Hg version 2.2.1 fine but now we are planning to upgrade Hg to Higher version 4.6.1 and I found the issue with below hook on higher version with error
def chkheads(ui, repo, **kwargs):
ui.status(_('chkheads hook\n'))
for b in repo.branchtags():
if len(repo.branchheads(b)) > 1:
ui.status(_("Two heads found n branch '%s'\n" % b))
ui.status(_('Only one head is allowed\n'))
return 1
Error: for b in repo.branchtags():
AttributeError: 'lfilesrepo' object has no attribute 'branchtags'
Has this branchtags() method been removed from 4.6.1 hg version?If yes, is there any way to do the checkheads in hg 4.6.1 version?