MercurialOperations: define and implement MergeBranch
This is the counterpart of Gitaly's `OperationService.UserMergeBranch`. We had to make a dedicated method because - the two-phase system of Gitaly does not make sense for Mercurial: merging does move branches right away, as branch information is enclosed in the changeset. We started development by mimicking it, but it soon became overly complicated - we have the `semi_linear` field, nothing alike on the Gitaly side, since the method always performs a merge, and ours would fast-forward by default. - we have error cases that do not exist in Git (obsolescence and instability checks). Actually, we reuse some of Gitaly errors to ease the burden of treatment on the client side. The case of `reference_check` being a borderline, but it shouldn't matter much. (bumping minimal py-heptapod version for `GitRepo.git()` helper method)
parent
833f4cc9
No related branches found
No related tags found
Showing
- hgitaly/service/mercurial_operations.py 214 additions, 0 deletionshgitaly/service/mercurial_operations.py
- hgitaly/service/tests/test_mercurial_operations.py 274 additions, 1 deletionhgitaly/service/tests/test_mercurial_operations.py
- hgitaly/stub/mercurial_operations_pb2.py 33 additions, 19 deletionshgitaly/stub/mercurial_operations_pb2.py
- hgitaly/stub/mercurial_operations_pb2_grpc.py 37 additions, 0 deletionshgitaly/stub/mercurial_operations_pb2_grpc.py
- install-requirements.txt 1 addition, 1 deletioninstall-requirements.txt
- protos/mercurial-operations.proto 52 additions, 0 deletionsprotos/mercurial-operations.proto
- ruby/lib/hgitaly/mercurial-operations_pb.rb 34 additions, 0 deletionsruby/lib/hgitaly/mercurial-operations_pb.rb
- ruby/lib/hgitaly/mercurial-operations_services_pb.rb 5 additions, 0 deletionsruby/lib/hgitaly/mercurial-operations_services_pb.rb
- tests_with_gitaly/comparison.py 6 additions, 0 deletionstests_with_gitaly/comparison.py
- tests_with_gitaly/test_operations.py 147 additions, 0 deletionstests_with_gitaly/test_operations.py
Loading
Please register or sign in to comment