Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 1307:3b717f27ffea
Merge with BOS
author | mpm@selenic.com |
---|---|
date | Thu, 22 Sep 2005 09:39:05 -0700 |
parents | 4f08da74cae8 abcdf14449ea |
children | c9cf171f30dd |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Sep 22 09:22:25 2005 -0700 +++ b/mercurial/commands.py Thu Sep 22 09:39:05 2005 -0700 @@ -2051,10 +2051,11 @@ mod = importh(x[0]) external.append(mod) for x in external: - for t in x.cmdtable: + cmdtable = getattr(x, 'cmdtable', {}) + for t in cmdtable: if t in table: - u.warn("module %s override %s\n" % (x.__name__, t)) - table.update(x.cmdtable) + u.warn("module %s overrides %s\n" % (x.__name__, t)) + table.update(cmdtable) try: cmd, func, args, options, cmdoptions = parse(args) @@ -2114,7 +2115,7 @@ path = options["repository"] or "" repo = hg.repository(ui=u, path=path) for x in external: - x.reposetup(u, repo) + if hasattr(x, 'reposetup'): x.reposetup(u, repo) d = lambda: func(u, repo, *args, **cmdoptions) else: d = lambda: func(u, *args, **cmdoptions)