equal
deleted
inserted
replaced
381 cmd = util.interpolate(r'\$', replace, cmd, escape_prefix=True) |
381 cmd = util.interpolate(r'\$', replace, cmd, escape_prefix=True) |
382 return util.system(cmd, environ=env, out=ui.fout) |
382 return util.system(cmd, environ=env, out=ui.fout) |
383 self.fn = fn |
383 self.fn = fn |
384 return |
384 return |
385 |
385 |
386 args = shlex.split(self.definition) |
386 try: |
|
387 args = shlex.split(self.definition) |
|
388 except ValueError, inst: |
|
389 def fn(ui, *args): |
|
390 ui.warn(_("error in definition for alias '%s': %s\n") |
|
391 % (self.name, inst)) |
|
392 return 1 |
|
393 self.fn = fn |
|
394 self.badalias = True |
|
395 return |
387 self.cmdname = cmd = args.pop(0) |
396 self.cmdname = cmd = args.pop(0) |
388 args = map(util.expandpath, args) |
397 args = map(util.expandpath, args) |
389 |
398 |
390 for invalidarg in ("--cwd", "-R", "--repository", "--repo", "--config"): |
399 for invalidarg in ("--cwd", "-R", "--repository", "--repo", "--config"): |
391 if _earlygetopt([invalidarg], args): |
400 if _earlygetopt([invalidarg], args): |