Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.RemoteRefUpdate


  static Collection<RemoteRefUpdate> copyUpdates(
      final Collection<RemoteRefUpdate> refUpdates) throws IOException {
    final Collection<RemoteRefUpdate> copy = new ArrayList<RemoteRefUpdate>(
        refUpdates.size());
    for (final RemoteRefUpdate rru : refUpdates)
      copy.add(new RemoteRefUpdate(rru, null));
    return copy;
  }
View Full Code Here


  void doPush() {
    try {
      URIish uri = new URIish(uriCombo.getText());
      Ref currentHead = repository.getRef(Constants.HEAD);
      RemoteRefUpdate update = new RemoteRefUpdate(repository,
          currentHead, prefixCombo.getItem(prefixCombo
              .getSelectionIndex()) + branchText.getText(),
          false, null, null);
      PushOperationSpecification spec = new PushOperationSpecification();
View Full Code Here

    PushOperationSpecification spec = new PushOperationSpecification();
    // the remote is invalid
    URIish remote = new URIish(INVALID_URI);
    // update master upon master
    Repository local = repository1.getRepository();
    RemoteRefUpdate update = new RemoteRefUpdate(local, "HEAD", "refs/heads/test",
        false, null, null);
    spec.addURIRefUpdates(remote, Collections.singletonList(update));
    // now we can construct the push operation
    PushOperation pop = new PushOperation(local, spec, false, 0);
    return pop;
View Full Code Here

    PushOperationSpecification spec = new PushOperationSpecification();
    // the remote is repo2
    URIish remote = repository2.getUri();
    // update master upon master
    List<RemoteRefUpdate> refUpdates = new ArrayList<RemoteRefUpdate>();
    RemoteRefUpdate update = new RemoteRefUpdate(repository1
        .getRepository(), "HEAD", "refs/heads/test", false, null, null);
    refUpdates.add(update);
    spec.addURIRefUpdates(remote, refUpdates);

    PushOperation pop = new PushOperation(repository1.getRepository(),
View Full Code Here

    // We want to push from repository 2 to 1 (because repository 2 already
    // has tracking set up)
    URIish remote = repository1.getUri();
    String trackingRef = "refs/remotes/origin/master";
    RemoteRefUpdate update = new RemoteRefUpdate(
        repository2.getRepository(), "HEAD", "refs/heads/master", false,
        trackingRef, null);
    PushOperationSpecification spec = new PushOperationSpecification();
    spec.addURIRefUpdates(remote, Arrays.asList(update));
View Full Code Here

    // the remote is repo2
    URIish remote = new URIish("file:///"
        + repository2.getRepository().getDirectory().toString());
    // update master upon master
    List<RemoteRefUpdate> refUpdates = new ArrayList<RemoteRefUpdate>();
    RemoteRefUpdate update = new RemoteRefUpdate(repository1
        .getRepository(), "HEAD", "refs/heads/test", false, null, null);
    refUpdates.add(update);
    spec.addURIRefUpdates(remote, refUpdates);
    // now we can construct the push operation
    PushOperation pop = new PushOperation(repository1.getRepository(),
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.RemoteRefUpdate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.