equal
deleted
inserted
replaced
2049 mod = getattr(mod, comp) |
2049 mod = getattr(mod, comp) |
2050 return mod |
2050 return mod |
2051 mod = importh(x[0]) |
2051 mod = importh(x[0]) |
2052 external.append(mod) |
2052 external.append(mod) |
2053 for x in external: |
2053 for x in external: |
2054 for t in x.cmdtable: |
2054 cmdtable = getattr(x, 'cmdtable', {}) |
|
2055 for t in cmdtable: |
2055 if t in table: |
2056 if t in table: |
2056 u.warn("module %s override %s\n" % (x.__name__, t)) |
2057 u.warn("module %s overrides %s\n" % (x.__name__, t)) |
2057 table.update(x.cmdtable) |
2058 table.update(cmdtable) |
2058 |
2059 |
2059 try: |
2060 try: |
2060 cmd, func, args, options, cmdoptions = parse(args) |
2061 cmd, func, args, options, cmdoptions = parse(args) |
2061 except ParseError, inst: |
2062 except ParseError, inst: |
2062 if inst.args[0]: |
2063 if inst.args[0]: |
2112 |
2113 |
2113 if cmd not in norepo.split(): |
2114 if cmd not in norepo.split(): |
2114 path = options["repository"] or "" |
2115 path = options["repository"] or "" |
2115 repo = hg.repository(ui=u, path=path) |
2116 repo = hg.repository(ui=u, path=path) |
2116 for x in external: |
2117 for x in external: |
2117 x.reposetup(u, repo) |
2118 if hasattr(x, 'reposetup'): x.reposetup(u, repo) |
2118 d = lambda: func(u, repo, *args, **cmdoptions) |
2119 d = lambda: func(u, repo, *args, **cmdoptions) |
2119 else: |
2120 else: |
2120 d = lambda: func(u, *args, **cmdoptions) |
2121 d = lambda: func(u, *args, **cmdoptions) |
2121 |
2122 |
2122 if options['profile']: |
2123 if options['profile']: |