diff mercurial/localrepo.py @ 17297:6955d69a52a4 stable

obsolete: warns if markers exist in a repo where the feature is not enabled We don't simply abort to allow the user to run other diagnostic commands.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Sat, 28 Jul 2012 13:05:25 +0200
parents 1f08ecc7febb
children 59c14bf5a48c
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Jul 28 13:19:06 2012 +0200
+++ b/mercurial/localrepo.py	Sat Jul 28 13:05:25 2012 +0200
@@ -289,6 +289,10 @@
     @storecache('obsstore')
     def obsstore(self):
         store = obsolete.obsstore(self.sopener)
+        if store and not obsolete._enabled:
+            # message is rare enough to not be stranlated
+            msg = 'obsolete feature not enabled but %i markers found!\n'
+            self.ui.warn(msg % len(list(store)))
         return store
 
     @propertycache