Show More
@@ -655,15 +655,7 b' def disabledext(name):' | |||
|
655 | 655 | if name in paths: |
|
656 | 656 | return _disabledhelp(paths[name]) |
|
657 | 657 | |
|
658 |
def disabledcmd(ui, cmd, strict |
|
|
659 | '''import disabled extensions until cmd is found. | |
|
660 | returns (cmdname, extname, module)''' | |
|
661 | ||
|
662 | paths = _disabledpaths(strip_init=True) | |
|
663 | if not paths: | |
|
664 | raise error.UnknownCommand(cmd) | |
|
665 | ||
|
666 | def findcmd(cmd, name, path): | |
|
658 | def _finddisabledcmd(ui, cmd, name, path, strict): | |
|
667 | 659 |
|
|
668 | 660 |
|
|
669 | 661 |
|
@@ -685,15 +677,23 b' def disabledcmd(ui, cmd, strict=False):' | |||
|
685 | 677 |
|
|
686 | 678 |
|
|
687 | 679 | |
|
680 | def disabledcmd(ui, cmd, strict=False): | |
|
681 | '''import disabled extensions until cmd is found. | |
|
682 | returns (cmdname, extname, module)''' | |
|
683 | ||
|
684 | paths = _disabledpaths(strip_init=True) | |
|
685 | if not paths: | |
|
686 | raise error.UnknownCommand(cmd) | |
|
687 | ||
|
688 | 688 | ext = None |
|
689 | 689 | # first, search for an extension with the same name as the command |
|
690 | 690 | path = paths.pop(cmd, None) |
|
691 | 691 | if path: |
|
692 | ext = findcmd(cmd, cmd, path) | |
|
692 | ext = _finddisabledcmd(ui, cmd, cmd, path, strict=strict) | |
|
693 | 693 | if not ext: |
|
694 | 694 | # otherwise, interrogate each extension until there's a match |
|
695 | 695 | for name, path in paths.iteritems(): |
|
696 | ext = findcmd(cmd, name, path) | |
|
696 | ext = _finddisabledcmd(ui, cmd, name, path, strict=strict) | |
|
697 | 697 | if ext: |
|
698 | 698 | break |
|
699 | 699 | if ext: |
General Comments 0
You need to be logged in to leave comments.
Login now