diffhelpers: backport
9e40bc4c1bde from C implementation
9e40bc4c1bde just says "harden testhunk." I don't think this would be
the case, but it makes some sense to avoid negative index.
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
new changesets d326ae2d01ee
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
new changesets d326ae2d01ee
4 files updated, 0 files merged, 0 files removed, 0 files unresolved