New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mercurial 3.5 changed API #54

Open
pirat89 opened this Issue Nov 27, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@pirat89

pirat89 commented Nov 27, 2015

function "context.memfilectx" requires "repo" object as first parameter. Patch could be something like below, however if you want to be compatible with older mercurial version, it should be modified.

From 43c3e6f0b30895fa9e8f21c49cd53ff222f888d4 Mon Sep 17 00:00:00 2001
From: Petr Stodulka <pstodulk@redhat.com>
Date: Fri, 27 Nov 2015 15:00:03 +0100
Subject: [PATCH] added missing parameter "repo" when call context.memfilectx

- mercurial has changed API and require parameter repo as first

---
 git-remote-hg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-remote-hg b/git-remote-hg
index da58c32..ea7fdfe 100755
--- a/git-remote-hg
+++ b/git-remote-hg
@@ -814,7 +814,7 @@ def parse_commit(parser):
         is_exec = of['mode'] == 'x'
         is_link = of['mode'] == 'l'
         rename = of.get('rename', None)
-        return context.memfilectx(f, of['data'],
+        return context.memfilectx(repo, f, of['data'],
                 is_link, is_exec, rename)

     repo = parser.repo
@@ -918,7 +918,7 @@ def write_tag(repo, tag, node, msg, author):
         except error.ManifestLookupError:
             data = ""
         content = data + "%s %s\n" % (node, tag)
-        return context.memfilectx(f, content, False, False, None)
+        return context.memfilectx(repo, f, content, False, False, None)

     p1 = tip.hex()
     p2 = '0' * 40
-- 
2.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment