From 0b6b83c3de446344f9691c505cddf633f9377b81 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Wed, 5 Feb 2020 22:17:58 +0100 Subject: [PATCH] Adapt to status becoming an object in Mercurial 5.3 Status has always been a tuple, but since 5.3, commit: https://www.mercurial-scm.org/repo/hg/rev/c5548b0b6847, it is an object. Therefore the __getitem__ of the tuple isn't available anymore. This fix is compatible with mercurial>=4.6, as the old status tuple still has the same properties. --- hg-fast-export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index f176239..352a88c 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -320,8 +320,8 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors, # later non-merge revision: feed in changed manifest # if we have exactly one parent, just take the changes from the # manifest without expensively comparing checksums - f=repo.status(parents[0],revnode)[:3] - added,changed,removed=f[1],f[0],f[2] + f=repo.status(parents[0],revnode) + added,changed,removed=f.added,f.modified,f.removed type='simple delta' else: # a merge with two parents wr('merge %s' % revnum_to_revref(parents[1], old_marks))