mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-10-26 06:06:06 +01:00
Adjust to modified internals of Mercurial 4.5
Fixes mnauw/git-remote-hg#12
This commit is contained in:
@@ -203,18 +203,16 @@ class GitHgRepo:
|
||||
context.memctx.__init__(self, repo, (p1, p2),
|
||||
data, files.keys(), self.getfilectx)
|
||||
self.files = files
|
||||
self.remotehg = import_sibling('remotehg', 'git-remote-hg')
|
||||
self.remotehg.hg_version = hg_version
|
||||
|
||||
def __contains__(self, item):
|
||||
return item in self.files
|
||||
|
||||
def getfilectx(self, repo, memctx, path):
|
||||
is_exec = is_link = rename = False
|
||||
if check_version(3, 1):
|
||||
return context.memfilectx(repo, path, self.files[path],
|
||||
is_link, is_exec, rename)
|
||||
else:
|
||||
return context.memfilectx(path, self.files[path],
|
||||
is_link, is_exec, rename)
|
||||
return self.remotehg.make_memfilectx(repo, memctx, path, self.files[path],
|
||||
is_link, is_exec, rename)
|
||||
|
||||
def read(self, relpath, rev=None):
|
||||
rev = rev if rev else ':0'
|
||||
|
||||
Reference in New Issue
Block a user