org.locationtech.geogig.repository.Repository.conflictsDatabase()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(9.9k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中org.locationtech.geogig.repository.Repository.conflictsDatabase方法的一些代码示例,展示了Repository.conflictsDatabase的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.conflictsDatabase方法的具体详情如下:
包路径:org.locationtech.geogig.repository.Repository
类名称:Repository
方法名:conflictsDatabase

Repository.conflictsDatabase介绍

暂无

代码示例

代码示例来源:origin: locationtech/geogig

assertNotNull(repo.objectDatabase());
assertNotNull(repo.graphDatabase());
assertNotNull(repo.conflictsDatabase());
assertNotNull(repo.blobStore());

代码示例来源:origin: org.locationtech.geogig/geogig-core

assertNotNull(repo.objectDatabase());
assertNotNull(repo.graphDatabase());
assertNotNull(repo.conflictsDatabase());
assertNotNull(repo.blobStore());

代码示例来源:origin: locationtech/geogig

@Test
public void testResetPathFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  RevCommit resetCommit = geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(e.getMessage().contains("conflict"));
  }
  geogig.command(ResetOp.class).addPattern(pointsName + "/" + idP1)
      .setCommit(Suppliers.ofInstance(resetCommit.getId())).call();
  Repository repository = geogig.getRepository();
  ConflictsDatabase conflicts = repository.conflictsDatabase();
  assertEquals(0, conflicts.getCountByPrefix(null, null));
}

代码示例来源:origin: locationtech/geogig

.setCommit(Suppliers.ofInstance(resetCommit.getId())).call();
Repository repository = geogig.getRepository();
assertEquals(0, repository.conflictsDatabase().getCountByPrefix(null, null));
Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
assertFalse(ref.isPresent());

代码示例来源:origin: org.locationtech.geogig/geogig-core

.setCommit(Suppliers.ofInstance(resetCommit.getId())).call();
Repository repository = geogig.getRepository();
assertEquals(0, repository.conflictsDatabase().getCountByPrefix(null, null));
Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
assertFalse(ref.isPresent());

代码示例来源:origin: org.locationtech.geogig/geogig-core

@Test
public void testResetPathFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  RevCommit resetCommit = geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(e.getMessage().contains("conflict"));
  }
  geogig.command(ResetOp.class).addPattern(pointsName + "/" + idP1)
      .setCommit(Suppliers.ofInstance(resetCommit.getId())).call();
  Repository repository = geogig.getRepository();
  ConflictsDatabase conflicts = repository.conflictsDatabase();
  assertEquals(0, conflicts.getCountByPrefix(null, null));
}

代码示例来源:origin: locationtech/geogig

@Test
public void testInsertionAndAdditionFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(e.getMessage().contains("conflict"));
  }
  insert(points1);
  geogig.command(AddOp.class).call();
  assertFalse(geogig.getRepository().conflictsDatabase().hasConflicts(null));
  geogig.command(CommitOp.class).call();
  Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
  assertFalse(ref.isPresent());
}

代码示例来源:origin: locationtech/geogig

ConflictsDatabase conflicts = repository.conflictsDatabase();
assertEquals(0, conflicts.getCountByPrefix(null, null));

代码示例来源:origin: org.locationtech.geogig/geogig-core

@Test
public void testInsertionAndAdditionFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(e.getMessage().contains("conflict"));
  }
  insert(points1);
  geogig.command(AddOp.class).call();
  assertFalse(geogig.getRepository().conflictsDatabase().hasConflicts(null));
  geogig.command(CommitOp.class).call();
  Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
  assertFalse(ref.isPresent());
}

代码示例来源:origin: org.locationtech.geogig/geogig-core

ConflictsDatabase conflicts = repository.conflictsDatabase();
assertEquals(0, conflicts.getCountByPrefix(null, null));

代码示例来源:origin: locationtech/geogig

@Test
public void testAdditionFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(true);
  }
  geogig.command(AddOp.class).call();
  assertFalse(geogig.getRepository().conflictsDatabase().hasConflicts(null));
  geogig.command(CommitOp.class).call();
  Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
  assertFalse(ref.isPresent());
}

代码示例来源:origin: locationtech/geogig

ConflictsDatabase conflicts = repository.conflictsDatabase();
assertEquals(0, conflicts.getCountByPrefix(null, null));
geogig.command(CommitOp.class).call();

代码示例来源:origin: org.locationtech.geogig/geogig-core

@Test
public void testAdditionFixesConflict() throws Exception {
  Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000),
      "POINT(1 1)");
  Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(2000),
      "POINT(1 1)");
  insertAndAdd(points1);
  geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("TestBranch").call();
  insertAndAdd(points1Modified);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("TestBranch").call();
  insertAndAdd(points1ModifiedB);
  insertAndAdd(points2);
  geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("master").call();
  Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
  try {
    geogig.command(MergeOp.class).addCommit(branch.getObjectId()).call();
    fail();
  } catch (MergeConflictsException e) {
    assertTrue(true);
  }
  geogig.command(AddOp.class).call();
  assertFalse(geogig.getRepository().conflictsDatabase().hasConflicts(null));
  geogig.command(CommitOp.class).call();
  Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
  assertFalse(ref.isPresent());
}

代码示例来源:origin: org.locationtech.geogig/geogig-remoting

ConflictsDatabase conflicts = repository.conflictsDatabase();
assertEquals(0, conflicts.getCountByPrefix(null, null));
geogig.command(CommitOp.class).call();

相关文章