Show More
@@ -627,7 +627,12 def _getlocal(ui, rpath): | |||
|
627 | 627 | |
|
628 | 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 | 636 | options = {} |
|
632 | 637 | |
|
633 | 638 | try: |
@@ -638,14 +643,18 def _checkshellalias(lui, ui, args): | |||
|
638 | 643 | if not args: |
|
639 | 644 | return |
|
640 | 645 | |
|
646 | if precheck: | |
|
641 | 647 | norepo = commands.norepo |
|
642 | 648 | optionalrepo = commands.optionalrepo |
|
643 | 649 | def restorecommands(): |
|
644 | 650 | commands.norepo = norepo |
|
645 | 651 | commands.optionalrepo = optionalrepo |
|
646 | ||
|
647 | 652 | cmdtable = commands.table.copy() |
|
648 | 653 | addaliases(lui, cmdtable) |
|
654 | else: | |
|
655 | def restorecommands(): | |
|
656 | pass | |
|
657 | cmdtable = commands.table | |
|
649 | 658 | |
|
650 | 659 | cmd = args[0] |
|
651 | 660 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now