On Mon, Jul 13, 2009 at 1:22 PM, Olemis Lang<[email protected]> wrote:
> On Mon, Jul 13, 2009 at 1:13 PM, Georg<[email protected]> wrote:
>> There's a patch pending integration into Trac SVN. It works for me. See
>> http://trac.edgewall.org/ticket/8460
>>
>
> Well as you can see in my previous that patch doesnt work for me since
> there are a few more things that need to be changed in `backend.py`.
>
Well the patch you mention is for rev 8352 and the stable dist is at 7744:
I saw the code in there and a better patch (for 7744 ;o) would be :
{{{
--- /media/A-Denys14GB/soft/Tools/PM/trac/tracX/hg/backend.py 2008-12-03
17:43:40.000000000 -0500
+++ /media/A-Denys14GB/soft/Tools/PM/trac/tracX/hg/backend_fixed.py
2009-07-13
14:42:25.000000000 -0500
@@ -47,8 +47,12 @@
from mercurial import hg
from mercurial.hg import repository
from mercurial.ui import ui
+
from mercurial.repo import RepoError
from mercurial.revlog import LookupError
+ if repr(RepoError) == "<unloaded module 'RepoError'>":
+ from mercurial.error import RepoError, LookupError
+
from mercurial.node import hex, short, nullid
from mercurial.util import pathto, cachefunc
from mercurial.cmdutil import walkchangerevs
@@ -204,7 +208,10 @@
def get_repository(self, type, dir, authname):
"""Return a `MercurialRepository`"""
if not self._version:
- from mercurial.version import get_version
+ try:
+ from mercurial.version import get_version
+ except ImportError: # gone in Mercurial 1.2 (hg:9626819b2e3d)
+ from mercurial.util import version as get_version
self._version = get_version()
self.env.systeminfo.append(('Mercurial', self._version))
if not self.ui:
@@ -251,7 +258,7 @@
class trac_ui(ui):
def __init__(self, log, *args, **kwargs):
kwargs = kwargs.copy()
- kwargs['interactive'] = False
+ # kwargs['interactive'] = False
ui.__init__(self, *args, **kwargs)
self.log = log
}}}
It should work with multiple versions of Mercurial ;o)
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---