hgmo: remove dummy changectx class (
bug 1360007); r?glob
This class was needed so we could pass a changectx like object into
pushlog.pushfromchangeset(). Now that the pushlog has an API to
accept a node, this fake API class isn't needed.
MozReview-Commit-ID: HFcG2SjROc6
--- a/hgext/hgmo/__init__.py
+++ b/hgext/hgmo/__init__.py
@@ -721,27 +721,19 @@ def filelog(orig, web, req, tmpl):
def __init__(self):
self.defaults = tmpl.defaults
def __call__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
return self
- class _ctx(object):
-
- def __init__(self, hex):
- self._hex = hex
-
- def hex(self):
- return self._hex
-
t = orig(web, req, _tmpl())
for entry in t.kwargs['entries']:
- push = web.repo.pushlog.pushfromchangeset(_ctx(entry['node']))
+ push = web.repo.pushlog.pushfromnode(bin(entry['node']))
if push:
entry['pushid'] = push.pushid
entry['pushdate'] = util.makedate(push.when)
else:
entry['pushid'] = None
entry['pushdate'] = None
return tmpl(*t.args, **t.kwargs)