diff mercurial/localrepo.py @ 7633:08cabecfa8a8

errors: move revlog errors - create error.py for exception classes to reduce demandloading - move revlog exceptions to it - change users to import error and drop revlog import if possible
author Matt Mackall <mpm@selenic.com>
date Sun, 11 Jan 2009 22:48:28 -0600
parents 4dd7b28003d2
children 1d54e2f6c0b7
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Jan 10 18:02:38 2009 -0600
+++ b/mercurial/localrepo.py	Sun Jan 11 22:48:28 2009 -0600
@@ -10,7 +10,7 @@
 import repo, changegroup
 import changelog, dirstate, filelog, manifest, context, weakref
 import lock, transaction, stat, errno, ui, store
-import os, revlog, time, util, extensions, hook, inspect
+import os, time, util, extensions, hook, inspect, error
 import match as match_
 import merge as merge_
 
@@ -177,7 +177,7 @@
         else:
             try:
                 prevtags = self.filectx('.hgtags', parent).data()
-            except revlog.LookupError:
+            except error.LookupError:
                 pass
             fp = self.wfile('.hgtags', 'wb')
             if prevtags:
@@ -332,7 +332,7 @@
             rev = c.rev()
             try:
                 fnode = c.filenode('.hgtags')
-            except revlog.LookupError:
+            except error.LookupError:
                 continue
             ret.append((rev, node, fnode))
             if fnode in last: