Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.Repository.resolve()


    // not hold true given other parameters in the GUI.
    Repository repository = FileRepositoryBuilder.create(new File(destRepo,
        Constants.DOT_GIT));
    assertNotNull(repository.resolve("src/" + SampleTestRepository.FIX));
    // we didn't clone that one
    assertNull(repository.resolve("src/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("stable"), repository
        .resolve("src/stable"));
    // A well known tag
    assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
View Full Code Here


        Constants.DOT_GIT));
    assertNotNull(repository.resolve("src/" + SampleTestRepository.FIX));
    // we didn't clone that one
    assertNull(repository.resolve("src/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("stable"), repository
        .resolve("src/stable"));
    // A well known tag
    assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
    // lots of refs
    assertTrue(repository.getAllRefs().size() >= 4);
View Full Code Here

        Constants.DOT_GIT));
    assertNotNull(repository.resolve("src/" + SampleTestRepository.FIX));
    // we didn't clone that one
    assertNull(repository.resolve("src/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("stable"), repository
        .resolve("src/stable"));
    // A well known tag
    assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
    // lots of refs
    assertTrue(repository.getAllRefs().size() >= 4);
View Full Code Here

    assertNull(repository.resolve("src/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("stable"), repository
        .resolve("src/stable"));
    // A well known tag
    assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
    // lots of refs
    assertTrue(repository.getAllRefs().size() >= 4);
    bot.button("Cancel").click();
  }
View Full Code Here

    TagBuilder tag = new TagBuilder();
    tag.setTag("SomeTag");
    tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
    tag.setMessage("I'm just a little tag");
    tag.setObjectId(repo.resolve(repo.getFullBranch()),
        Constants.OBJ_COMMIT);
    commitOfTag = tag.getObjectId();
    TagOperation top = new TagOperation(repo, tag, false);
    top.execute(null);
    touchAndSubmit(null);
View Full Code Here

  @Test
  public void testCompareWithPreviousWithMerge() throws Exception {
    Repository repo = lookupRepository(repositoryFile);

    Git git = new Git(repo);
    ObjectId masterId = repo.resolve("refs/heads/master");
    Ref newBranch = git.checkout().setCreateBranch(true)
        .setStartPoint(commitOfTag.name()).setName("toMerge").call();
    ByteArrayInputStream bis = new ByteArrayInputStream(
        "Modified".getBytes("UTF-8"));
    ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ1)
View Full Code Here

    Repository repo = lookupRepository(childRepositoryFile);
    REMOTE_BRANCHES = provider.getText(new RemoteTrackingNode(
        new RepositoryNode(null, repo), repo));
    LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(
        null, repo), repo));
    ObjectId id = repo.resolve(repo.getFullBranch());
    initialCommitId = id.name();
  }

  @Test
  public void testFetchFromOriginThenMerge() throws Exception {
View Full Code Here

  }

  private RevCommit getCommitForHead() throws Exception {
    Repository repo = lookupRepository(repositoryFile);
    RevWalk rw = new RevWalk(repo);
    ObjectId id = repo.resolve(repo.getFullBranch());
    return rw.parseCommit(id);
  }

  private void mergeBranch(String branchToMerge, boolean squash) throws Exception {
    SWTBotShell mergeDialog = openMergeDialog();
View Full Code Here

    // we'd expect from a clone made this way, that would possibly
    // not hold true given other parameters in the GUI.
    Repository repository = FileRepositoryBuilder.create(new File(
        destinationRepo, Constants.DOT_GIT));
    // we always have an origin/master
    assertNotNull(repository.resolve("origin/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("master"), repository
        .resolve("origin/master"));
    // A well known tag
    assertNotNull(repository.resolve(
View Full Code Here

    Repository repository = FileRepositoryBuilder.create(new File(
        destinationRepo, Constants.DOT_GIT));
    // we always have an origin/master
    assertNotNull(repository.resolve("origin/master"));
    // and a local master initialized from origin/master (default!)
    assertEquals(repository.resolve("master"), repository
        .resolve("origin/master"));
    // A well known tag
    assertNotNull(repository.resolve(
        Constants.R_TAGS + SampleTestRepository.v1_0_name).name());
    // lots of refs
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.