Skip to content

Conversation

@MatthijsBurgh
Copy link
Contributor

fixes #196

Status has always been a tuple, but since 5.3, commit: https://www.mercurial-scm.org/repo/hg/rev/c5548b0b6847. is it 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.

@chrisjbillington
Copy link
Contributor

The fix works for me both with hg 5.3 on Windows and 5.2.2 on Arch Linux

@stevenaw
Copy link

stevenaw commented Feb 6, 2020

This worked for me (hg 5.3, Ubuntu 18.04, Python 2.7.17)

@chrisjbillington
Copy link
Contributor

FWIW this looks like a duplicate of #185

@MatthijsBurgh
Copy link
Contributor Author

@frej We discovered this is exactly the same patch as #185. I think my explanation is better, why this fix is needed/will work.

Please let me know what I should do.

Copy link
Owner

@frej frej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you and @chrisjbillington have noticed, this is the same fix as #185 and your explanation is indeed much better and includes the relevant information. The only problem is that the explanation is not in in the commit message, just in the PR comment. Please include the information in the git commit and I'll merge this fix.

While editing the commit message, please drop the "(status)" part in the subject, as it looks like a sub-system tag. Why not "Adapt to status becoming an object in Mercurial 5.3"?

@frej frej added the patch-exists A patch exists, but it requires revision before it will be accepted label Feb 7, 2020
@MatthijsBurgh
Copy link
Contributor Author

Commit message adapted

Copy link
Owner

@frej frej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please line wrap the body of the commit message.

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.
@MatthijsBurgh MatthijsBurgh changed the title (status) fix 5.3 compatibility fix 5.3 compatibility Feb 8, 2020
@MatthijsBurgh
Copy link
Contributor Author

Please line wrap the body of the commit message.

Done

@frej frej removed the patch-exists A patch exists, but it requires revision before it will be accepted label Feb 9, 2020
@frej
Copy link
Owner

frej commented Feb 9, 2020

Looks good. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: 'status' object has no attribute '__getitem__'

4 participants