Mercurial > evolve
diff hgext3rd/topic/discovery.py @ 6304:c00332abb66b
topic: remove 4.7 compat for transaction validators
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 15 Aug 2022 18:45:55 +0400 |
parents | a2855aff1268 |
children | 58b856416d2e |
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py Thu Aug 11 11:22:26 2022 +0400 +++ b/hgext3rd/topic/discovery.py Mon Aug 15 18:45:55 2022 +0400 @@ -265,9 +265,7 @@ return tr._prepushheads = _nbheads(op.repo) reporef = weakref.ref(op.repo) - if util.safehasattr(tr, 'validator'): # hg <= 4.7 (ebbba3ba3f66) - oldvalidator = tr.validator - elif util.safehasattr(tr, '_validator'): + if util.safehasattr(tr, '_validator'): # hg <= 5.3 (36f08ae87ef6) oldvalidator = tr._validator @@ -303,9 +301,7 @@ _validate(tr) return oldvalidator(tr) - if util.safehasattr(tr, 'validator'): # hg <= 4.7 (ebbba3ba3f66) - tr.validator = validator - elif util.safehasattr(tr, '_validator'): + if util.safehasattr(tr, '_validator'): # hg <= 5.3 (36f08ae87ef6) tr._validator = validator else: