- data = text.encode(self.charset)
- self.save_data(title, data, author, comment, parent)
-
- def page_text(self, title):
- """Read unicode text of a page."""
-
- data = self.open_page(title).read()
- text = unicode(data, self.charset, 'replace')
- return text
-
- def page_lines(self, page):
- for data in page:
- yield unicode(data, self.charset, 'replace')
+ def _commit(self, files, comment, user):
+ match = mercurial.match.exact(self.repo_path, '', list(files))
+ return self.repo.commit(match=match, text=comment, user=user, force=True)