##// END OF EJS Templates
pathutil: use util.pathto() to calculate relative cwd in canonpath()...
Matt Harbison -
r34966:f445b10d stable
parent child Browse files
Show More
@@ -184,8 +184,10 b' def canonpath(root, cwd, myname, auditor'
184 try:
184 try:
185 if cwd != root:
185 if cwd != root:
186 canonpath(root, root, myname, auditor)
186 canonpath(root, root, myname, auditor)
187 hint = (_("consider using '--cwd %s'")
187 relpath = util.pathto(root, cwd, '')
188 % os.path.relpath(root, cwd))
188 if relpath[-1] == pycompat.ossep:
189 relpath = relpath[:-1]
190 hint = (_("consider using '--cwd %s'") % relpath)
189 except error.Abort:
191 except error.Abort:
190 pass
192 pass
191
193
General Comments 0
You need to be logged in to leave comments. Login now