git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
b9e97017d71baed2bb8efdad248c8bec46ddbf4c blob 1805 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.googlesource.gerrit.plugins.replication;

import com.google.auto.value.AutoValue;
import com.google.gerrit.entities.Project;
import com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage.ReplicateRefUpdate;
import com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage.UriUpdates;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.Set;
import org.eclipse.jgit.transport.URIish;

@AutoValue
public abstract class TestUriUpdates implements UriUpdates {
  public static TestUriUpdates create(ReplicateRefUpdate update) throws URISyntaxException {
    return create(
        Project.nameKey(update.project),
        new URIish(update.uri),
        update.remote,
        Collections.singleton(update.ref));
  }

  public static TestUriUpdates create(
      Project.NameKey project, URIish uri, String remote, Set<String> refs) {
    return new AutoValue_TestUriUpdates(project, uri, remote, refs);
  }

  @Override
  public abstract Project.NameKey getProjectNameKey();

  @Override
  public abstract URIish getURI();

  @Override
  public abstract String getRemoteName();

  @Override
  public abstract Set<String> getRefs();
}
debug log:

solving b9e9701 ...
found b9e9701 in https://public-inbox.org/git/20200805071610.12249-1-achakila@codeaurora.org/

applying [1/1] https://public-inbox.org/git/20200805071610.12249-1-achakila@codeaurora.org/
diff --git a/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java b/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java
new file mode 100644
index 0000000..b9e9701

Checking patch src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java...
Applied patch src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java cleanly.

index at:
100644 b9e97017d71baed2bb8efdad248c8bec46ddbf4c	src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).