Mercurial > hg-stable
changeset 6857:e8c2dae47799
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 02 Aug 2008 14:08:21 +0200 |
parents | 8dc510c4caee (current diff) c6890cfc2253 (diff) |
children | 0b6f2fa5e03f |
files | mercurial/hgweb/webcommands.py |
diffstat | 2 files changed, 21 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Wed Jul 30 22:33:40 2008 +0200 +++ b/hgext/color.py Sat Aug 02 14:08:21 2008 +0200 @@ -40,7 +40,7 @@ status.unknown = magenta bold underline status.ignored = black bold - 'none' turns off all effects +# 'none' turns off all effects status.clean = none status.copied = none @@ -79,11 +79,12 @@ def render_effects(text, *effects): 'Wrap text in commands to turn on each effect.' - start = [] + start = [ str(_effect_params['none'][0]) ] stop = [] for effect in effects: start.append(str(_effect_params[effect][0])) stop.append(str(_effect_params[effect][1])) + stop.append(str(_effect_params['none'][1])) start = '\033[' + ';'.join(start) + 'm' stop = '\033[' + ';'.join(stop) + 'm' return start + text + stop @@ -144,13 +145,17 @@ retval = qseriesfunc(ui, repo, **opts) patches = ui.popbuffer().splitlines() for patch in patches: + patchname = patch + if opts['summary']: + patchname = patchname.split(': ')[0] + if ui.verbose: + patchname = patchname.split(' ', 2)[-1] + if opts['missing']: effects = _patch_effects['missing'] - # Determine if patch is applied. Search for beginning of output - # line in the applied patch list, in case --summary has been used - # and output line isn't just the patch name. + # Determine if patch is applied. elif [ applied for applied in repo.mq.applied - if patch.startswith(applied.name) ]: + if patchname == applied.name ]: effects = _patch_effects['applied'] else: effects = _patch_effects['unapplied'] @@ -166,7 +171,8 @@ nocoloropt = ('', 'no-color', None, _("don't colorize output")) _decoratecmd(ui, 'status', commands.table, colorstatus, nocoloropt) _configcmdeffects(ui, 'status', _status_effects); - if ui.config('extensions', 'hgext.mq', default=None) is not None: + if ui.config('extensions', 'hgext.mq') is not None or \ + ui.config('extensions', 'mq') is not None: from hgext import mq _decoratecmd(ui, 'qseries', mq.cmdtable, colorqseries, nocoloropt) _configcmdeffects(ui, 'qseries', _patch_effects);
--- a/mercurial/hgweb/webcommands.py Wed Jul 30 22:33:40 2008 +0200 +++ b/mercurial/hgweb/webcommands.py Sat Aug 02 14:08:21 2008 +0200 @@ -91,16 +91,15 @@ def file(web, req, tmpl): path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) - if path: + if not path: + return manifest(web, req, tmpl) + try: + return _filerevision(web, tmpl, webutil.filectx(web.repo, req)) + except revlog.LookupError, inst: try: - return _filerevision(web, tmpl, webutil.filectx(web.repo, req)) - except revlog.LookupError, inst: - pass - - try: - return manifest(web, req, tmpl) - except ErrorResponse: - raise inst + return manifest(web, req, tmpl) + except ErrorResponse: + raise inst def _search(web, tmpl, query):