Show More
@@ -434,6 +434,7 b' class cmdalias(object):' | |||
|
434 | 434 | self.help = '' |
|
435 | 435 | self.norepo = True |
|
436 | 436 | self.optionalrepo = False |
|
437 | self.inferrepo = False | |
|
437 | 438 | self.badalias = None |
|
438 | 439 | self.unknowncmd = False |
|
439 | 440 | |
@@ -499,6 +500,8 b' class cmdalias(object):' | |||
|
499 | 500 | self.norepo = False |
|
500 | 501 | if cmd in commands.optionalrepo.split(' '): |
|
501 | 502 | self.optionalrepo = True |
|
503 | if cmd in commands.inferrepo.split(' '): | |
|
504 | self.inferrepo = True | |
|
502 | 505 | if self.help.startswith("hg " + cmd): |
|
503 | 506 | # drop prefix in old-style help lines so hg shows the alias |
|
504 | 507 | self.help = self.help[4 + len(cmd):] |
@@ -557,6 +560,8 b' def addaliases(ui, cmdtable):' | |||
|
557 | 560 | commands.norepo += ' %s' % alias |
|
558 | 561 | if aliasdef.optionalrepo: |
|
559 | 562 | commands.optionalrepo += ' %s' % alias |
|
563 | if aliasdef.inferrepo: | |
|
564 | commands.inferrepo += ' %s' % alias | |
|
560 | 565 | |
|
561 | 566 | def _parse(ui, args): |
|
562 | 567 | options = {} |
@@ -723,9 +728,11 b' def _checkshellalias(lui, ui, args, prec' | |||
|
723 | 728 | strict = True |
|
724 | 729 | norepo = commands.norepo |
|
725 | 730 | optionalrepo = commands.optionalrepo |
|
731 | inferrepo = commands.inferrepo | |
|
726 | 732 | def restorecommands(): |
|
727 | 733 | commands.norepo = norepo |
|
728 | 734 | commands.optionalrepo = optionalrepo |
|
735 | commands.inferrepo = inferrepo | |
|
729 | 736 | cmdtable = commands.table.copy() |
|
730 | 737 | addaliases(lui, cmdtable) |
|
731 | 738 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now