8000 mercurial 3.5 changed API · Issue #54 · cosmin/git-hg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
mercurial 3.5 changed API #54
Open
@pirat89

Description

@pirat89

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0