##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r6857:e8c2dae4 merge default
parent child Browse files
Show More
@@ -40,7 +40,7 status.deleted = cyan bold underline
40 40 status.unknown = magenta bold underline
41 41 status.ignored = black bold
42 42
43 'none' turns off all effects
43 # 'none' turns off all effects
44 44 status.clean = none
45 45 status.copied = none
46 46
@@ -79,11 +79,12 from mercurial.i18n import _
79 79
80 80 def render_effects(text, *effects):
81 81 'Wrap text in commands to turn on each effect.'
82 start = []
82 start = [ str(_effect_params['none'][0]) ]
83 83 stop = []
84 84 for effect in effects:
85 85 start.append(str(_effect_params[effect][0]))
86 86 stop.append(str(_effect_params[effect][1]))
87 stop.append(str(_effect_params['none'][1]))
87 88 start = '\033[' + ';'.join(start) + 'm'
88 89 stop = '\033[' + ';'.join(stop) + 'm'
89 90 return start + text + stop
@@ -144,13 +145,17 def colorqseries(qseriesfunc, ui, repo,
144 145 retval = qseriesfunc(ui, repo, **opts)
145 146 patches = ui.popbuffer().splitlines()
146 147 for patch in patches:
148 patchname = patch
149 if opts['summary']:
150 patchname = patchname.split(': ')[0]
151 if ui.verbose:
152 patchname = patchname.split(' ', 2)[-1]
153
147 154 if opts['missing']:
148 155 effects = _patch_effects['missing']
149 # Determine if patch is applied. Search for beginning of output
150 # line in the applied patch list, in case --summary has been used
151 # and output line isn't just the patch name.
156 # Determine if patch is applied.
152 157 elif [ applied for applied in repo.mq.applied
153 if patch.startswith(applied.name) ]:
158 if patchname == applied.name ]:
154 159 effects = _patch_effects['applied']
155 160 else:
156 161 effects = _patch_effects['unapplied']
@@ -166,7 +171,8 def uisetup(ui):
166 171 nocoloropt = ('', 'no-color', None, _("don't colorize output"))
167 172 _decoratecmd(ui, 'status', commands.table, colorstatus, nocoloropt)
168 173 _configcmdeffects(ui, 'status', _status_effects);
169 if ui.config('extensions', 'hgext.mq', default=None) is not None:
174 if ui.config('extensions', 'hgext.mq') is not None or \
175 ui.config('extensions', 'mq') is not None:
170 176 from hgext import mq
171 177 _decoratecmd(ui, 'qseries', mq.cmdtable, colorqseries, nocoloropt)
172 178 _configcmdeffects(ui, 'qseries', _patch_effects);
@@ -91,16 +91,15 def _filerevision(web, tmpl, fctx):
91 91
92 92 def file(web, req, tmpl):
93 93 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
94 if path:
94 if not path:
95 return manifest(web, req, tmpl)
96 try:
97 return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
98 except revlog.LookupError, inst:
95 99 try:
96 return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
97 except revlog.LookupError, inst:
98 pass
99
100 try:
101 return manifest(web, req, tmpl)
102 except ErrorResponse:
103 raise inst
100 return manifest(web, req, tmpl)
101 except ErrorResponse:
102 raise inst
104 103
105 104 def _search(web, tmpl, query):
106 105
General Comments 0
You need to be logged in to leave comments. Login now