Show More
@@ -80,6 +80,7 b" like CVS' $Log$, are not supported. A ke" | |||||
80 |
|
80 | |||
81 | from mercurial import commands, cmdutil, context, dispatch, filelog, revlog |
|
81 | from mercurial import commands, cmdutil, context, dispatch, filelog, revlog | |
82 | from mercurial import patch, localrepo, templater, templatefilters, util |
|
82 | from mercurial import patch, localrepo, templater, templatefilters, util | |
|
83 | from mercurial.hgweb import webcommands | |||
83 | from mercurial.node import * |
|
84 | from mercurial.node import * | |
84 | from mercurial.i18n import _ |
|
85 | from mercurial.i18n import _ | |
85 | import re, shutil, tempfile, time |
|
86 | import re, shutil, tempfile, time | |
@@ -121,7 +122,23 b' def _kwdispatch_parse(ui, args):' | |||||
121 | _cmd, func, args, options, _cmdoptions = _dispatch_parse(ui, args) |
|
122 | _cmd, func, args, options, _cmdoptions = _dispatch_parse(ui, args) | |
122 | return _cmd, func, args, options, _cmdoptions |
|
123 | return _cmd, func, args, options, _cmdoptions | |
123 |
|
124 | |||
|
125 | def kwweb_changeset(web, req, tmpl): | |||
|
126 | try: | |||
|
127 | _kwtemplater.matcher = util.never | |||
|
128 | except AttributeError: | |||
|
129 | pass | |||
|
130 | return web.changeset(tmpl, web.changectx(req)) | |||
|
131 | ||||
|
132 | def kwweb_filediff(web, req, tmpl): | |||
|
133 | try: | |||
|
134 | _kwtemplater.matcher = util.never | |||
|
135 | except AttributeError: | |||
|
136 | pass | |||
|
137 | return web.filediff(tmpl, web.filectx(req)) | |||
|
138 | ||||
124 | dispatch._parse = _kwdispatch_parse |
|
139 | dispatch._parse = _kwdispatch_parse | |
|
140 | webcommands.changeset = webcommands.rev = kwweb_changeset | |||
|
141 | webcommands.filediff = webcommands.diff = kwweb_filediff | |||
125 |
|
142 | |||
126 |
|
143 | |||
127 | class kwtemplater(object): |
|
144 | class kwtemplater(object): |
General Comments 0
You need to be logged in to leave comments.
Login now