gitlab-mirror: recover if latest changeset of published topic can't be found
This condition was an indication of corruption, but refusing the push currently does much more harm than cleaning up the condition, even if the cleanup risks itself to turn out wrong. In the case detailed in heptapod#265, we had a Git repository inconsistency which we could only reproduce manually by forcing the Git branch for the topic: the previously know topic head was both public and not on topic. Getting `None` in the other call to `published_topic_latest_hg_sha` can't happen, but this will have to be refactored for clarity.
Showing
- hgext3rd/heptapod/git.py 25 additions, 7 deletionshgext3rd/heptapod/git.py
- hgext3rd/heptapod/tests/git/test_inner.py 1 addition, 5 deletionshgext3rd/heptapod/tests/git/test_inner.py
- hgext3rd/heptapod/tests/git/test_integration.py 53 additions, 0 deletionshgext3rd/heptapod/tests/git/test_integration.py
Loading
Please register or sign in to comment