Changeset - 056d2fc1f93f
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2014-08-12 13:08:23
madski@unity3d.com
mercurial: support Mercurial 3.1 after memfilectx.__init__ was changed in 503bb3af70fe
2 files changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/inmemory.py
Show inline comments
 
@@ -53,7 +53,7 @@ class MercurialInMemoryChangeset(BaseInM
 
            # check if this path is added
 
            for node in self.added:
 
                if node.path == path:
 
                    return memfilectx(path=node.path,
 
                    return memfilectx(_repo, path=node.path,
 
                        data=(node.content.encode('utf8')
 
                              if not node.is_binary else node.content),
 
                        islink=False,
 
@@ -63,7 +63,7 @@ class MercurialInMemoryChangeset(BaseInM
 
            # or changed
 
            for node in self.changed:
 
                if node.path == path:
 
                    return memfilectx(path=node.path,
 
                    return memfilectx(_repo, path=node.path,
 
                        data=(node.content.encode('utf8')
 
                              if not node.is_binary else node.content),
 
                        islink=False,
kallithea/lib/vcs/utils/hgcompat.py
Show inline comments
 
@@ -32,3 +32,11 @@ from mercurial.node import nullrev
 
# those authnadlers are patched for python 2.6.5 bug an
 
# infinit looping when given invalid resources
 
from mercurial.url import httpbasicauthhandler, httpdigestauthhandler
 

	
 
import inspect
 
# Mercurial 3.1 503bb3af70fe
 
if inspect.getargspec(memfilectx.__init__).args[1] != 'repo':
 
    _org__init__=memfilectx.__init__
 
    def _memfilectx__init__(self, repo, *a, **b):
 
        return _org__init__(self, *a, **b)
 
    memfilectx.__init__ = _memfilectx__init__
0 comments (0 inline, 0 general)