Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2020-10-22 09:56:46 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2020-10-22 09:56:46 +0300
commit19109e7090eb6dab2b8c0c168bbef76ceca79a31 (patch)
treeeb2c40f8c56456a89da7f900bdbe2d29de4a204f
parenta139759f1941017cb7e6271ec554e4ac3c9311d7 (diff)
parentc2473d18d21b5a1124ac09580a85d57af746c69d (diff)
Merge branch 'id-expose-ancestor-path-for-conflicts-rpc' into 'master'
Expose ancestor path in Conflicts RPC See merge request gitlab-org/gitaly!2672
-rw-r--r--changelogs/unreleased/id-expose-ancestor-path-for-conflicts-rpc.yml5
-rw-r--r--internal/gitaly/service/conflicts/list_conflict_files.go9
-rw-r--r--internal/gitaly/service/conflicts/list_conflict_files_test.go92
-rw-r--r--proto/conflicts.proto1
-rw-r--r--proto/go/gitalypb/conflicts.pb.go91
-rw-r--r--ruby/lib/gitaly_server/conflicts_service.rb3
-rw-r--r--ruby/lib/gitlab/git/conflict/file.rb3
-rw-r--r--ruby/proto/gitaly/conflicts_pb.rb1
8 files changed, 136 insertions, 69 deletions
diff --git a/changelogs/unreleased/id-expose-ancestor-path-for-conflicts-rpc.yml b/changelogs/unreleased/id-expose-ancestor-path-for-conflicts-rpc.yml
new file mode 100644
index 000000000..2be187353
--- /dev/null
+++ b/changelogs/unreleased/id-expose-ancestor-path-for-conflicts-rpc.yml
@@ -0,0 +1,5 @@
+---
+title: Expose ancestor path in Conflicts RPC
+merge_request: 2672
+author:
+type: changed
diff --git a/internal/gitaly/service/conflicts/list_conflict_files.go b/internal/gitaly/service/conflicts/list_conflict_files.go
index b1c9d8cb6..4c43ce10b 100644
--- a/internal/gitaly/service/conflicts/list_conflict_files.go
+++ b/internal/gitaly/service/conflicts/list_conflict_files.go
@@ -69,10 +69,11 @@ func (s *server) listConflictFiles(request *gitalypb.ListConflictFilesRequest, s
conflictFiles = append(conflictFiles, &gitalypb.ConflictFile{
ConflictFilePayload: &gitalypb.ConflictFile_Header{
Header: &gitalypb.ConflictFileHeader{
- CommitOid: request.OurCommitOid,
- TheirPath: []byte(conflict.Their.Path),
- OurPath: []byte(conflict.Our.Path),
- OurMode: conflict.Our.Mode,
+ CommitOid: request.OurCommitOid,
+ TheirPath: []byte(conflict.Their.Path),
+ OurPath: []byte(conflict.Our.Path),
+ AncestorPath: []byte(conflict.Ancestor.Path),
+ OurMode: conflict.Our.Mode,
},
},
})
diff --git a/internal/gitaly/service/conflicts/list_conflict_files_test.go b/internal/gitaly/service/conflicts/list_conflict_files_test.go
index 56386aba1..b77a389c0 100644
--- a/internal/gitaly/service/conflicts/list_conflict_files_test.go
+++ b/internal/gitaly/service/conflicts/list_conflict_files_test.go
@@ -8,7 +8,6 @@ import (
"path/filepath"
"testing"
- "github.com/golang/protobuf/proto"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/internal/git"
"gitlab.com/gitlab-org/gitaly/internal/metadata/featureflag"
@@ -83,9 +82,7 @@ end
}
c, err := client.ListConflictFiles(ctx, request)
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
expectedFiles := []*conflictFile{
{
@@ -112,11 +109,66 @@ end
require.Len(t, receivedFiles, len(expectedFiles))
for i := 0; i < len(expectedFiles); i++ {
- require.True(t, proto.Equal(receivedFiles[i].header, expectedFiles[i].header))
+ testhelper.ProtoEqual(t, receivedFiles[i].header, expectedFiles[i].header)
require.Equal(t, expectedFiles[i].content, receivedFiles[i].content)
}
}
+func TestSuccessfulListConflictFilesRequestWithAncestor(t *testing.T) {
+ testListConflictFiles(t, testSuccessfulListConflictFilesRequestWithAncestor)
+}
+
+func testSuccessfulListConflictFilesRequestWithAncestor(t *testing.T, ctx context.Context) {
+ serverSocketPath, stop := runConflictsServer(t)
+ defer stop()
+
+ client, conn := NewConflictsClient(t, serverSocketPath)
+ defer conn.Close()
+
+ testRepo, _, cleanupFn := testhelper.NewTestRepo(t)
+ defer cleanupFn()
+
+ ourCommitOid := "824be604a34828eb682305f0d963056cfac87b2d"
+ theirCommitOid := "1450cd639e0bc6721eb02800169e464f212cde06"
+
+ request := &gitalypb.ListConflictFilesRequest{
+ Repository: testRepo,
+ OurCommitOid: ourCommitOid,
+ TheirCommitOid: theirCommitOid,
+ }
+
+ c, err := client.ListConflictFiles(ctx, request)
+ require.NoError(t, err)
+
+ expectedFiles := []*conflictFile{
+ {
+ header: &gitalypb.ConflictFileHeader{
+ CommitOid: ourCommitOid,
+ OurMode: int32(0100644),
+ OurPath: []byte("files/ruby/popen.rb"),
+ TheirPath: []byte("files/ruby/popen.rb"),
+ AncestorPath: []byte("files/ruby/popen.rb"),
+ },
+ },
+ {
+ header: &gitalypb.ConflictFileHeader{
+ CommitOid: ourCommitOid,
+ OurMode: int32(0100644),
+ OurPath: []byte("files/ruby/regex.rb"),
+ TheirPath: []byte("files/ruby/regex.rb"),
+ AncestorPath: []byte("files/ruby/regex.rb"),
+ },
+ },
+ }
+
+ receivedFiles := getConflictFiles(t, c)
+ require.Len(t, receivedFiles, len(expectedFiles))
+
+ for i := 0; i < len(expectedFiles); i++ {
+ testhelper.ProtoEqual(t, receivedFiles[i].header, expectedFiles[i].header)
+ }
+}
+
func TestListConflictFilesHugeDiff(t *testing.T) {
testListConflictFiles(t, testListConflictFilesHugeDiff)
}
@@ -154,23 +206,19 @@ func testListConflictFilesHugeDiff(t *testing.T, ctx context.Context) {
receivedFiles := getConflictFiles(t, c)
require.Len(t, receivedFiles, 2)
- require.True(t,
- proto.Equal(&gitalypb.ConflictFileHeader{
- CommitOid: our,
- OurMode: int32(0100644),
- OurPath: []byte("a"),
- TheirPath: []byte("a"),
- }, receivedFiles[0].header),
- )
-
- require.True(t,
- proto.Equal(&gitalypb.ConflictFileHeader{
- CommitOid: our,
- OurMode: int32(0100644),
- OurPath: []byte("b"),
- TheirPath: []byte("b"),
- }, receivedFiles[1].header),
- )
+ testhelper.ProtoEqual(t, &gitalypb.ConflictFileHeader{
+ CommitOid: our,
+ OurMode: int32(0100644),
+ OurPath: []byte("a"),
+ TheirPath: []byte("a"),
+ }, receivedFiles[0].header)
+
+ testhelper.ProtoEqual(t, &gitalypb.ConflictFileHeader{
+ CommitOid: our,
+ OurMode: int32(0100644),
+ OurPath: []byte("b"),
+ TheirPath: []byte("b"),
+ }, receivedFiles[1].header)
}
func buildCommit(t *testing.T, ctx context.Context, repo *gitalypb.Repository, repoPath string, files map[string][]byte) string {
diff --git a/proto/conflicts.proto b/proto/conflicts.proto
index 489066cab..c8f3e46f2 100644
--- a/proto/conflicts.proto
+++ b/proto/conflicts.proto
@@ -32,6 +32,7 @@ message ConflictFileHeader {
bytes their_path = 3;
bytes our_path = 4;
int32 our_mode = 5;
+ bytes ancestor_path = 6;
}
message ConflictFile {
diff --git a/proto/go/gitalypb/conflicts.pb.go b/proto/go/gitalypb/conflicts.pb.go
index 3c77b71e3..343ed50bc 100644
--- a/proto/go/gitalypb/conflicts.pb.go
+++ b/proto/go/gitalypb/conflicts.pb.go
@@ -84,6 +84,7 @@ type ConflictFileHeader struct {
TheirPath []byte `protobuf:"bytes,3,opt,name=their_path,json=theirPath,proto3" json:"their_path,omitempty"`
OurPath []byte `protobuf:"bytes,4,opt,name=our_path,json=ourPath,proto3" json:"our_path,omitempty"`
OurMode int32 `protobuf:"varint,5,opt,name=our_mode,json=ourMode,proto3" json:"our_mode,omitempty"`
+ AncestorPath []byte `protobuf:"bytes,6,opt,name=ancestor_path,json=ancestorPath,proto3" json:"ancestor_path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -142,6 +143,13 @@ func (m *ConflictFileHeader) GetOurMode() int32 {
return 0
}
+func (m *ConflictFileHeader) GetAncestorPath() []byte {
+ if m != nil {
+ return m.AncestorPath
+ }
+ return nil
+}
+
type ConflictFile struct {
// Types that are valid to be assigned to ConflictFilePayload:
// *ConflictFile_Header
@@ -489,47 +497,48 @@ func init() {
func init() { proto.RegisterFile("conflicts.proto", fileDescriptor_28fc8937e7d75862) }
var fileDescriptor_28fc8937e7d75862 = []byte{
- // 630 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x6f, 0xd3, 0x30,
- 0x14, 0x9e, 0xbb, 0xae, 0x6b, 0xdf, 0xb2, 0xad, 0xb3, 0x40, 0xcb, 0x2a, 0x4d, 0xcb, 0x32, 0x26,
- 0x05, 0x04, 0xed, 0x34, 0x38, 0x70, 0x9b, 0xd4, 0x69, 0x30, 0x4d, 0x4c, 0x20, 0x23, 0x2e, 0x5c,
- 0xa2, 0x34, 0xf1, 0x1a, 0xa3, 0x34, 0x0e, 0xb6, 0x33, 0xa9, 0x7f, 0x82, 0x2b, 0x1c, 0x39, 0xf0,
- 0x5b, 0xf8, 0x0b, 0xfc, 0x17, 0x24, 0x24, 0x54, 0x3b, 0xc9, 0xba, 0xb5, 0x1d, 0x27, 0x6e, 0xf1,
- 0xf7, 0xbe, 0x7c, 0xef, 0xf3, 0x7b, 0x9f, 0x0c, 0x9b, 0x21, 0x4f, 0xaf, 0x12, 0x16, 0x2a, 0xd9,
- 0xcd, 0x04, 0x57, 0x1c, 0x37, 0x86, 0x4c, 0x05, 0xc9, 0xb8, 0x03, 0x09, 0x4b, 0x95, 0xc1, 0x3a,
- 0x96, 0x8c, 0x03, 0x41, 0x23, 0x73, 0x72, 0x7f, 0x20, 0xb0, 0xdf, 0x30, 0xa9, 0x4e, 0x8b, 0x3f,
- 0x5f, 0xb1, 0x84, 0x4a, 0x42, 0x3f, 0xe7, 0x54, 0x2a, 0xfc, 0x12, 0x40, 0xd0, 0x8c, 0x4b, 0xa6,
- 0xb8, 0x18, 0xdb, 0xc8, 0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x6a, 0x8f, 0xa1,
- 0xad, 0x05, 0x72, 0xc5, 0x78, 0xea, 0x53, 0x21, 0xb8, 0x31, 0xdb, 0x22, 0x9b, 0x37, 0xf8, 0xd9,
- 0x04, 0x3e, 0xfe, 0x85, 0xa0, 0x5d, 0x09, 0xbc, 0xa7, 0xe2, 0x9a, 0x85, 0x14, 0x0f, 0x60, 0x6b,
- 0x26, 0xc7, 0xd8, 0x29, 0xef, 0xb9, 0xe8, 0x51, 0xea, 0xec, 0xdf, 0xc3, 0x30, 0xce, 0xdc, 0xc6,
- 0xef, 0xaf, 0x5e, 0xad, 0x59, 0x3b, 0x42, 0xd8, 0x87, 0xf6, 0x5d, 0xff, 0x78, 0xef, 0x1f, 0xa3,
- 0xec, 0x38, 0x8b, 0x09, 0xb7, 0x1a, 0x20, 0x0f, 0xf5, 0x8f, 0x3e, 0x4e, 0xc8, 0x49, 0x30, 0xe8,
- 0x86, 0x7c, 0xd4, 0x33, 0x9f, 0xcf, 0xb8, 0x18, 0xf6, 0x8c, 0x44, 0x4f, 0xbf, 0xb2, 0xbd, 0x21,
- 0x2f, 0xce, 0xd9, 0x60, 0xd0, 0xd0, 0xd0, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x26,
- 0x14, 0x93, 0xad, 0x05, 0x00, 0x00,
+ // 646 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xd1, 0x6e, 0xd3, 0x30,
+ 0x14, 0x9d, 0xbb, 0xae, 0x6b, 0xef, 0xb2, 0xad, 0xb3, 0x40, 0xcb, 0x2a, 0x4d, 0xcb, 0x32, 0x26,
+ 0x05, 0x04, 0xed, 0x34, 0x78, 0xe0, 0x6d, 0x52, 0xa7, 0xc1, 0x34, 0x31, 0x81, 0x8c, 0x78, 0xe1,
+ 0x25, 0x4a, 0x13, 0xaf, 0x35, 0x4a, 0xe3, 0x60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 0x8e, 0xb3, 0x98, 0x70, 0xab, 0x01, 0xf2, 0x50, 0xff, 0xe8, 0x63, 0x4e, 0x8e, 0x83, 0x41,
+ 0x37, 0xe4, 0xe3, 0x9e, 0xf9, 0x7c, 0xc6, 0xc5, 0xb0, 0x67, 0x24, 0x7a, 0xfa, 0x29, 0xee, 0x0d,
+ 0x79, 0xf1, 0x9f, 0x0e, 0x06, 0x0d, 0x0d, 0x3d, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x80, 0x8f,
+ 0x22, 0x49, 0xd2, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/ruby/lib/gitaly_server/conflicts_service.rb b/ruby/lib/gitaly_server/conflicts_service.rb
index 90d3a762b..d1f487d96 100644
--- a/ruby/lib/gitaly_server/conflicts_service.rb
+++ b/ruby/lib/gitaly_server/conflicts_service.rb
@@ -76,7 +76,8 @@ module GitalyServer
commit_oid: file.commit_oid,
their_path: file.their_path.b,
our_path: file.our_path.b,
- our_mode: file.our_mode
+ our_mode: file.our_mode,
+ ancestor_path: file.ancestor_path&.b
)
end
diff --git a/ruby/lib/gitlab/git/conflict/file.rb b/ruby/lib/gitlab/git/conflict/file.rb
index 6f7874582..762b82707 100644
--- a/ruby/lib/gitlab/git/conflict/file.rb
+++ b/ruby/lib/gitlab/git/conflict/file.rb
@@ -4,7 +4,7 @@ module Gitlab
class File
UnsupportedEncoding = Class.new(StandardError)
- attr_reader :their_path, :our_path, :our_mode, :repository, :commit_oid
+ attr_reader :their_path, :our_path, :our_mode, :ancestor_path, :repository, :commit_oid
attr_accessor :raw_content
@@ -14,6 +14,7 @@ module Gitlab
@their_path = conflict[:theirs][:path]
@our_path = conflict[:ours][:path]
@our_mode = conflict[:ours][:mode]
+ @ancestor_path = conflict.dig(:ancestor, :path)
@raw_content = raw_content
end
diff --git a/ruby/proto/gitaly/conflicts_pb.rb b/ruby/proto/gitaly/conflicts_pb.rb
index 2ae48859b..7ee2fb9e4 100644
--- a/ruby/proto/gitaly/conflicts_pb.rb
+++ b/ruby/proto/gitaly/conflicts_pb.rb
@@ -17,6 +17,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :their_path, :bytes, 3
optional :our_path, :bytes, 4
optional :our_mode, :int32, 5
+ optional :ancestor_path, :bytes, 6
end
add_message "gitaly.ConflictFile" do
oneof :conflict_file_payload do