subrepo: improve lookup error messages
authorWagner Bruna <wbruna@softwareexpress.com.br>
Mon, 13 Sep 2010 10:33:49 -0300
changeset 12503 b4711585a455
parent 12502 41f2fa72fa82
child 12504 f7dd8bffe18c
subrepo: improve lookup error messages
mercurial/subrepo.py
tests/test-subrepo-recursion.t
--- a/mercurial/subrepo.py	Sun Sep 26 22:22:59 2010 +0200
+++ b/mercurial/subrepo.py	Mon Sep 13 10:33:49 2010 -0300
@@ -331,7 +331,7 @@
             ctx2 = self._repo[rev2]
             return self._repo.status(ctx1, ctx2, **opts)
         except error.RepoLookupError, inst:
-            self._repo.ui.warn(_("warning: %s in %s\n")
+            self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n')
                                % (inst, relpath(self)))
             return [], [], [], [], [], [], []
 
@@ -347,7 +347,7 @@
                                    prefix=os.path.join(prefix, self._path),
                                    listsubrepos=True, **opts)
         except error.RepoLookupError, inst:
-            self._repo.ui.warn(_("warning: %s in %s\n")
+            self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n')
                                % (inst, relpath(self)))
 
     def archive(self, archiver, prefix):
--- a/tests/test-subrepo-recursion.t	Sun Sep 26 22:22:59 2010 +0200
+++ b/tests/test-subrepo-recursion.t	Mon Sep 13 10:33:49 2010 -0300
@@ -350,4 +350,4 @@
 
   $ rm -r foo
   $ hg status
-  warning: unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98' in foo
+  warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"