Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.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 | 9626819b2e3d |
children | e3f8c6d6b72e |
line wrap: on
line diff
--- a/mercurial/dispatch.py Sat Jan 10 18:02:38 2009 -0600 +++ b/mercurial/dispatch.py Sun Jan 11 22:48:28 2009 -0600 @@ -8,7 +8,7 @@ from i18n import _ from repo import RepoError import os, sys, atexit, signal, pdb, socket, errno, shlex, time -import util, commands, hg, lock, fancyopts, revlog, extensions, hook +import util, commands, hg, lock, fancyopts, extensions, hook, error import cmdutil import ui as _ui @@ -76,7 +76,7 @@ except lock.LockUnavailable, inst: ui.warn(_("abort: could not lock %s: %s\n") % (inst.desc or inst.filename, inst.strerror)) - except revlog.RevlogError, inst: + except error.RevlogError, inst: ui.warn(_("abort: %s!\n") % inst) except util.SignalInterrupt: ui.warn(_("killed!\n"))