History view shows wrong file list for root changeset (revision 0)
Created originally on Bitbucket by colin-hurley (Colin Hurley)
Environment
- Mercurial 4.2.2
- Eclipse RCP Neon 3
- MercurialEclipse 2.4.1.201711121153
Steps to reproduce
This issue can be reproduced with most repositories.
- Right-click the project and select Team > History
- Select changeset 0
Expected behavior
The history view should display the list of changes in chageset 0 (as with hg status --change 0
)
Actual behavior
The history view displays an incorrect list of changes.
Workaround
From the command line, execute hg status --change 0
to show the correct list of changes for the root changeset.
Other thoughts
After debugging the code, the problem appears to be how MercurialEclipse gets the status for revision 0 (which is a "root" changeset - a changeset without any parents). All other revisions in the repository have at least one parent revision, so MercurialEclipse executes e.g. hg status --rev 0 --rev 1
to get the list of changes in revision 1. For revision 0, MercurialEclipse executes hg status --rev 0
, which compares revision 0 against the working tree instead. So, the history view will actually show a different list of changes for revision 0 depending on which changeset is currently the parent of the working tree.
At any rate, changing MercurialEclipse to use hg status --change ...
instead of hg status --rev ...
for root changesets should remedy this problem.