Rafael Martins committed bd9a20c

passing the revision_id instead of the revision object to the MercurialContent class

  • Participants
  • Parent commits 5ff4f31

Comments (0)

Files changed (1)


             revision_id = None
             if not app.debug:
                 revision_id = 'tip'
-            app.hg = MercurialContent(repo, repo[revision_id])
+            app.hg = MercurialContent(repo, revision_id)
 class MercurialContent(object):
     """Object that represents a blohg Mercurial repository."""
-    def __init__(self, repo, revision):
+    def __init__(self, repo, revision_id):
         """Class constructor"""
         self.repo = repo
-        self.revision = revision
+        self.revision = repo[revision_id]
     def _metadata_from_filenames(self, locale, filenames):
         """Method to convert a list of filenames on a list of
         return filenames
     def __repr__(self):
-        return '<Mercurial %r>' % self.repo.root
+        return '<MercurialContent %r>' % self.repo.root
 class Metadata(object):