Show More
@@ -627,7 +627,12 def _getlocal(ui, rpath): | |||||
627 |
|
627 | |||
628 | return path, lui |
|
628 | return path, lui | |
629 |
|
629 | |||
630 | def _checkshellalias(lui, ui, args): |
|
630 | def _checkshellalias(lui, ui, args, precheck=True): | |
|
631 | """Return the function to run the shell alias, if it is required | |||
|
632 | ||||
|
633 | 'precheck' is whether this function is invoked before adding | |||
|
634 | aliases or not. | |||
|
635 | """ | |||
631 | options = {} |
|
636 | options = {} | |
632 |
|
637 | |||
633 | try: |
|
638 | try: | |
@@ -638,14 +643,18 def _checkshellalias(lui, ui, args): | |||||
638 | if not args: |
|
643 | if not args: | |
639 | return |
|
644 | return | |
640 |
|
645 | |||
|
646 | if precheck: | |||
641 | norepo = commands.norepo |
|
647 | norepo = commands.norepo | |
642 | optionalrepo = commands.optionalrepo |
|
648 | optionalrepo = commands.optionalrepo | |
643 | def restorecommands(): |
|
649 | def restorecommands(): | |
644 | commands.norepo = norepo |
|
650 | commands.norepo = norepo | |
645 | commands.optionalrepo = optionalrepo |
|
651 | commands.optionalrepo = optionalrepo | |
646 |
|
||||
647 | cmdtable = commands.table.copy() |
|
652 | cmdtable = commands.table.copy() | |
648 | addaliases(lui, cmdtable) |
|
653 | addaliases(lui, cmdtable) | |
|
654 | else: | |||
|
655 | def restorecommands(): | |||
|
656 | pass | |||
|
657 | cmdtable = commands.table | |||
649 |
|
658 | |||
650 | cmd = args[0] |
|
659 | cmd = args[0] | |
651 | try: |
|
660 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now