Show More
@@ -152,7 +152,17 b' def canonpath(root, cwd, myname, auditor' | |||
|
152 | 152 | break |
|
153 | 153 | name = dirname |
|
154 | 154 | |
|
155 | raise util.Abort(_("%s not under root '%s'") % (myname, root)) | |
|
155 | # A common mistake is to use -R, but specify a file relative to the repo | |
|
156 | # instead of cwd. Detect that case, and provide a hint to the user. | |
|
157 | hint = None | |
|
158 | try: | |
|
159 | canonpath(root, root, myname, auditor) | |
|
160 | hint = _("consider using '--cwd %s'") % os.path.relpath(root, cwd) | |
|
161 | except util.Abort: | |
|
162 | pass | |
|
163 | ||
|
164 | raise util.Abort(_("%s not under root '%s'") % (myname, root), | |
|
165 | hint=hint) | |
|
156 | 166 | |
|
157 | 167 | def normasprefix(path): |
|
158 | 168 | '''normalize the specified path as path prefix |
General Comments 0
You need to be logged in to leave comments.
Login now