[PATCH 2 of 3] dispatch: remove superfluous try/except when reading local ui config

Brodie Rao brodie at bitheap.org
Mon Oct 4 15:08:35 CDT 2010


# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1286220398 18000
# Node ID 73221ab2b97452cc4834e60b1d4fc66fd766d517
# Parent  cc8b8d7c31863e0c00d490e130274c0d0ff53f6d
dispatch: remove superfluous try/except when reading local ui config

ui.readconfig() already handles IOError in this case.

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -419,11 +419,8 @@ def _getlocal(ui, rpath):
     if not path:
         lui = ui
     else:
-        try:
-            lui = ui.copy()
-            lui.readconfig(os.path.join(path, ".hg", "hgrc"))
-        except IOError:
-            pass
+        lui = ui.copy()
+        lui.readconfig(os.path.join(path, ".hg", "hgrc"))
 
     if rpath:
         path = lui.expandpath(rpath[-1])


More information about the Mercurial-devel mailing list