diff hgext/obsolete.py @ 338:b922d144f93d stable

obsolete: we are not compatible with 2.1 any more
author David Douard <david.douard@logilab.fr>
date Fri, 06 Jul 2012 15:39:01 +0200
parents ebfd1b96a013
children 3853061e7fea
line wrap: on
line diff
--- a/hgext/obsolete.py	Wed Jul 04 18:00:43 2012 +0200
+++ b/hgext/obsolete.py	Fri Jul 06 15:39:01 2012 +0200
@@ -942,6 +942,8 @@
     if not repo.local():
         return
 
+    if not util.safehasattr(repo.opener, 'tryread'):
+        raise util.Abort('Obsolete extension require Mercurial 2.2 (or later)')
     opull = repo.pull
     opush = repo.push
     olock = repo.lock