# HG changeset patch # User Arne Babenhauserheide # Date 1537300329 -7200 # Node ID d75d704772d1dfbceef32f3da7fece4afc4eda14 # Parent bbad9283f80f733f39025cab93c6ec7bfa12434f compat: support hg 4.7 demandimport.IGNORES API with fallback to 4.6 API This uses try-except to have a fastpath for the 4.7 API. Thanks to Pierre-Yves David. diff -r bbad9283f80f -r d75d704772d1 hggit/__init__.py --- a/hggit/__init__.py Mon May 28 10:08:42 2018 +0200 +++ b/hggit/__init__.py Tue Sep 18 21:52:09 2018 +0200 @@ -73,9 +73,12 @@ # baseset was added in hg 3.0 pass -demandimport.ignore.extend([ - 'collections', -]) +try: + demandimport.IGNORES.add('collections') +except AttributeError as e: # pre 4.7 API + demandimport.ignore.extend([ + 'collections', + ]) __version__ = '0.8.11'