public TestData branchAndCheckout(final String newBranch) { return branch(newBranch).checkout(newBranch); }
assertNotNull(request.getTransactionId()); origin.branch("targetbranch");
public TestData branchAndCheckout(final String newBranch) { return branch(newBranch).checkout(newBranch); }
@Given("^There is a repository with multiple branches named ([^\"]*)$") public void setUpMultipleBranches(String name) throws Throwable { Repository repo = context.createRepo(name).init("webuser", "webuser@test.com").getRepo(); TestData data = new TestData(repo); data.addAndCommit("Added Point.1", TestData.point1); data.branch("non_conflicting"); data.branch("conflicting"); data.addAndCommit("Modified Point.1", TestData.point1_modified); data.branch("master_original"); data.checkout("conflicting"); data.remove(TestData.point1); data.add(); data.commit("Removed Point.1"); data.checkout("non_conflicting"); data.addAndCommit("Added Point.2", TestData.point2); data.checkout("master"); repo.close(); openedRepos.add(name); }
@Given("^There are conflicts on the \"([^\"]*)\" repo in the (@[^\"]*) transaction$") public void There_are_conflict(String repoName, String txId) throws Throwable { Repository repo = context.getRepo(repoName); TestData data = new TestData(repo); GeogigTransaction transaction = repo.command(TransactionResolve.class) .setId(UUID.fromString(context.getVariable(txId))).call().get(); data.setTransaction(transaction); data.addAndCommit("Added Point.1", TestData.point1); data.branch("branch1"); data.addAndCommit("Modified Point.1", TestData.point1_modified); data.checkout("branch1"); data.remove(TestData.point1); data.add(); data.commit("Removed Point.1"); data.checkout("master"); try { data.mergeNoFF("branch1", "Merge branch1"); } catch (MergeConflictsException e) { // Expected } assertEquals(1, transaction.command(ConflictsCountOp.class).call().longValue()); // add the repo to the set so it can be closed openedRepos.add(repoName); }