equal
deleted
inserted
replaced
154 |
154 |
155 # A common mistake is to use -R, but specify a file relative to the repo |
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. |
156 # instead of cwd. Detect that case, and provide a hint to the user. |
157 hint = None |
157 hint = None |
158 try: |
158 try: |
159 canonpath(root, root, myname, auditor) |
159 if cwd != root: |
160 hint = _("consider using '--cwd %s'") % os.path.relpath(root, cwd) |
160 canonpath(root, root, myname, auditor) |
|
161 hint = (_("consider using '--cwd %s'") |
|
162 % os.path.relpath(root, cwd)) |
161 except util.Abort: |
163 except util.Abort: |
162 pass |
164 pass |
163 |
165 |
164 raise util.Abort(_("%s not under root '%s'") % (myname, root), |
166 raise util.Abort(_("%s not under root '%s'") % (myname, root), |
165 hint=hint) |
167 hint=hint) |