Mercurial > hg-stable
changeset 25022:10bbdcd89164
canonpath: fix infinite recursion
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 12 May 2015 19:40:45 -0500 |
parents | 9a74b9919581 |
children | 405cb38448ad |
files | mercurial/pathutil.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/pathutil.py Tue May 12 11:44:14 2015 -0700 +++ b/mercurial/pathutil.py Tue May 12 19:40:45 2015 -0500 @@ -156,8 +156,10 @@ # 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