From ad36a250646fcd85fc50242cdd8a5402a96ccc0f Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 14 May 2018 21:22:43 +0200 Subject: [PATCH] helper: adjust to Mercurial 4.6 wrt subrepo helper functions ... now in a separate module as of 55e8efa2451a0999b56978e471dc31dc8066a0fb --- git-hg-helper | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-hg-helper b/git-hg-helper index 3c20429..7d34d4b 100755 --- a/git-hg-helper +++ b/git-hg-helper @@ -239,7 +239,12 @@ class GitHgRepo: if not repo: die('no hg repo for alias %s' % remote) ctx = self.dictmemctx(repo, files) - state = subrepo.state(ctx, ui.ui()) + # helpers moved around 4.6 + if hasattr(subrepo, 'state'): + state = subrepo.state(ctx, ui.ui()) + else: + from mercurial import subrepoutil + state = subrepoutil.state(ctx, ui.ui()) log('obtained state %s', state) # now filter on type and resolve relative urls