equal
deleted
inserted
replaced
221 |
221 |
222 args = shlex.split(self.definition) |
222 args = shlex.split(self.definition) |
223 cmd = args.pop(0) |
223 cmd = args.pop(0) |
224 args = map(util.expandpath, args) |
224 args = map(util.expandpath, args) |
225 |
225 |
|
226 for invalidarg in ("--cwd", "-R", "--repository", "--repo"): |
|
227 if _earlygetopt([invalidarg], args): |
|
228 def fn(ui, *args): |
|
229 ui.warn(_("error in definition for alias '%s': %s may only " |
|
230 "be given on the command line\n") |
|
231 % (self.name, invalidarg)) |
|
232 return 1 |
|
233 |
|
234 self.fn = fn |
|
235 self.badalias = True |
|
236 return |
|
237 |
226 try: |
238 try: |
227 tableentry = cmdutil.findcmd(cmd, cmdtable, False)[1] |
239 tableentry = cmdutil.findcmd(cmd, cmdtable, False)[1] |
228 if len(tableentry) > 2: |
240 if len(tableentry) > 2: |
229 self.fn, self.opts, self.help = tableentry |
241 self.fn, self.opts, self.help = tableentry |
230 else: |
242 else: |