Commit: lookup methods have to work with obsolete
The Rails app will store some changeset IDs and get back to HGitaly for information after a while. For instance, this is what happens with Merge Requests. It's perfectly possible that the changeset has become obsolete in the mean time. Hence the right thing to do is to make these commit methods work on the unfiltered repository. In order to mutualize, we're actually making the `gitlab_revision_changeset` return also obsolete changesets if queried by exact hash. This is consistent with the Git case: a ref should never be obsolete, but an exact lookup can return unreferenced commits. In the tests, it was about time for the `make_empty_repo` helper to activate the evolve extension. Thankfully no other test is affected (without evolve, `amend` would strip the previous changeset)
parent
74f9767b
No related branches found
No related tags found
Showing
- hgitaly/revision.py 7 additions, 1 deletionhgitaly/revision.py
- hgitaly/service/commit.py 5 additions, 2 deletionshgitaly/service/commit.py
- hgitaly/service/tests/test_commit.py 17 additions, 0 deletionshgitaly/service/tests/test_commit.py
- hgitaly/tests/common.py 2 additions, 1 deletionhgitaly/tests/common.py
- hgitaly/tests/test_revision.py 35 additions, 0 deletionshgitaly/tests/test_revision.py
Loading
Please register or sign in to comment