##// END OF EJS Templates
alias: make shadowing behavior more consistent (issue2054)...
alias: make shadowing behavior more consistent (issue2054) Currently, given an alias like the following: [alias] summary = summary --remote The alias might be executed - or it might not - depending on the order of the cmdtable dict. This happens because cmdalias gets assigned back to the cmdtable like so: cmdtable['summary'] = ... Yet '^summary|sum' is still in the table, so which one cmdutil.findcmd() chooses isn't deterministic. This patch makes cmdalias assign back to '^summary|sum'. It uses the same cmdtable key lookup that extensions.wrapcommand() does.

File last commit:

r10996:f6d41bfc default
r12039:18e1e752 stable
Show More
__init__.py
31 lines | 1.0 KiB | text/x-python | PythonLexer
Eric Hopper
Fixing up comment headers for split up code.
r2391 # hgweb/__init__.py - web interface to a mercurial repository
Eric Hopper
Moving hgweb.py into it's own module in preparation for breaking it up.
r2311 #
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005 Matt Mackall <mpm@selenic.com>
#
Martin Geisler
updated license to be explicit about GPL version 2
r8225 # This software may be used and distributed according to the terms of the
Matt Mackall
Update license to GPLv2+
r10263 # GNU General Public License version 2 or any later version.
Eric Hopper
Moving hgweb.py into it's own module in preparation for breaking it up.
r2311
Matt Mackall
hgweb: make hgweb.hgweb a unified interface to hgweb/hgwebdir
r10996 import os
Matt Mackall
Replace demandload with new demandimport
r3877 import hgweb_mod, hgwebdir_mod
Matt Mackall
hgweb: make hgweb.hgweb a unified interface to hgweb/hgwebdir
r10996 def hgweb(config, name=None, baseui=None):
'''create an hgweb wsgi object
config can be one of:
- repo object (single repo view)
- path to repo (single repo view)
- path to config file (multi-repo view)
- dict of virtual:real pairs (multi-repo view)
- list of virtual:real tuples (multi-repo view)
'''
if ((isinstance(config, str) and not os.path.isdir(config)) or
isinstance(config, dict) or isinstance(config, list)):
# create a multi-dir interface
return hgwebdir_mod.hgwebdir(config, baseui=baseui)
return hgweb_mod.hgweb(config, name=name, baseui=baseui)
Matt Mackall
Replace demandload with new demandimport
r3877
Matt Mackall
hgweb: make top-level prototypes mirror their callees
r10992 def hgwebdir(config, baseui=None):
return hgwebdir_mod.hgwebdir(config, baseui=baseui)
Matt Mackall
Replace demandload with new demandimport
r3877