This patch focus on the hg-cpython part of this work. Bridging the python code
with the new rust code in hg-core. The next patch will actually plug this in
the python code.
The rust code use multiple Python callback, python related error within this
callback are not expected unless they are a programming error or a data
corruption. In addition, these callback will slowly be replaced by native Rust
code. For these reasons, we use will deal with unexpected error within this
callback using rust Panic and let the rust-cpython layer deal with raising a
The code dealing with the ChangedFile instance is repeating itself a lot. I did
not factor these duplication out because that whole code will get replaced by
entirely different one in a handful of changesets.