diff --git a/mercurial/pathutil.py b/mercurial/pathutil.py
--- a/mercurial/pathutil.py
+++ b/mercurial/pathutil.py
@@ -156,8 +156,10 @@ def canonpath(root, cwd, myname, auditor
         # instead of cwd.  Detect that case, and provide a hint to the user.
         hint = None
         try:
-            canonpath(root, root, myname, auditor)
-            hint = _("consider using '--cwd %s'") % os.path.relpath(root, cwd)
+            if cwd != root:
+                canonpath(root, root, myname, auditor)
+                hint = (_("consider using '--cwd %s'")
+                        % os.path.relpath(root, cwd))
         except util.Abort:
             pass