Skip to content

Commit

Permalink
Adapt to status becoming an object in Mercurial 5.3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MatthijsBurgh committed Feb 8, 2020
1 parent ed36227 commit 0b6b83c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hg-fast-export.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def get_branchname(name):
# 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))
Expand Down

0 comments on commit 0b6b83c

Please sign in to comment.