Traceback with recent version of Mercurial

Hello,

recent version of Mercurial have changed the changectx() object; now it require always a version number.

I did fix it this way:

# HG changeset patch
# User gaddo <marco.gaddoni x gmail.com>
# Date 1227963903 -3600
# Node ID f70a2bade99048fb2147290601b55ad8bbafc6ea
# Parent  8e214f333291ae0140f12eb91c35c1976083e297
changectx needs a revision with the latest version of mercurial.

diff -r 8e214f333291 -r f70a2bade990 hatta.py
--- a/hatta.py	Sat Nov 29 14:03:00 2008 +0100
+++ b/hatta.py	Sat Nov 29 14:05:03 2008 +0100
@@ -220,7 +220,7 @@
         lock = self._lock()
         try:
             mercurial.util.rename(file_name, file_path)
-            if repo_file not in self.repo.changectx():
+            if repo_file not in self.repo.changectx(''):
                 self.repo.add([repo_file])
             self.repo.commit(files=[repo_file], text=text, user=user,
                              force=True, empty_ok=True)
@@ -300,7 +300,7 @@

     def _find_filectx(self, title):
         repo_file = self._title_to_file(title)
-        changectx = self.repo.changectx()
+        changectx = self.repo.changectx('')
         stack = [changectx]
         while repo_file not in changectx:
             if not stack:
@@ -335,7 +335,7 @@
             raise werkzeug.exceptions.NotFound()

     def history(self):
-        changectx = self.repo.changectx()
+        changectx = self.repo.changectx('')
         maxrev = changectx.rev()
         minrev = 0
         for wiki_rev in range(maxrev, minrev-1, -1):

Thank you very much, the patch is applied, but not tested with the new version of Mercurial yet. – Radomir Dopieralski


Fixed Bugs