I'm new to web2py and tried the mercurial integration in the admin
application, but it failed with an error. Here is a patch for
'applications/admin/controllers/mercurial.py'.

Günter

diff -u mercurial.py.orig mercurial.py
--- mercurial.py.orig   2011-11-15 08:14:57.000000000 +0100
+++ mercurial.py        2011-11-15 08:15:21.000000000 +0100
@@ -45,7 +45,8 @@
                 INPUT(_type='submit',_value='Commit'))
     if form.accepts(request.vars,session):
         oldid = repo[repo.lookup('.')]
-        cmdutil.addremove(repo)
+        from mercurial import scmutil
+        scmutil.addremove(repo)
         repo.commit(text=form.vars.comment)
         if repo[repo.lookup('.')] == oldid:
             response.flash = 'no changes'

Reply via email to