Check length for parents before usage
Review Request #9679 — Created Feb. 20, 2018 and submitted
The first changeset cannot have a parent so this would be an empty list.
That should be checked.Sometimes mercurial uses "0000000000000000000000000000000000000000"
to indicate that the parent is the "null" changeset. Sometimes the
array is empty.
Used a repo with a few changesets. Saw
that it will result into an error if first
changeset will be fetched with cmdline or hgweb.Added this change and saw that cmdline and hgweb
won't get an error.
- Testing Done:
-
Used a repo with a few changesets. Saw
that it will result into an error if first ~ changeset will be fetch with cmdline or hgweb. ~ changeset will be fetched with cmdline or hgweb. Added this change and saw that cmdline and hgweb
won't get an error.
- Description:
-
~ The first changeset cannot have a parent so
~ this would be an empty list. That should be ~ checked. ~ The first changeset cannot have a parent so this would be an empty list.
~ That should be checked. ~ + Sometimes mercurial uses "0000000000000000000000000000000000000000"
+ to indicate that the parent is the "null" changeset. Sometimes the + array is empty. - Commit:
-
2363eaf25f49de25250cc8e21bf64f2611275c32bb290e0b0ce1e09e453c00ba186b771e8010a6e2
- Diff:
-
Revision 2 (+17 -5)