mercurial/dispatch.py
changeset 11681 c5e555e064d0
parent 11601 4d9b4725acac
parent 11676 e4357c214bf1
child 11695 ee8f36a6c766
--- a/mercurial/dispatch.py	Tue Jul 20 15:49:28 2010 +0200
+++ b/mercurial/dispatch.py	Sun Jul 25 21:20:05 2010 -0500
@@ -262,7 +262,7 @@
         if self.shadows:
             ui.debug("alias '%s' shadows command\n" % self.name)
 
-        return self.fn(ui, *args, **opts)
+        return util.checksignature(self.fn)(ui, *args, **opts)
 
 def addaliases(ui, cmdtable):
     # aliases are processed after extensions have been loaded, so they
@@ -380,7 +380,12 @@
         os.chdir(cwd[-1])
 
     # read the local repository .hgrc into a local ui object
-    path = cmdutil.findrepo(os.getcwd()) or ""
+    try:
+        wd = os.getcwd()
+    except OSError, e:
+        raise util.Abort(_("error getting current working directory: %s") % 
+                         e.strerror)
+    path = cmdutil.findrepo(wd) or ""
     if not path:
         lui = ui
     else: