ObjectDatabase db = geogit.getContext().objectDatabase();
final RevTree tree1 = tree(1000, db);
final RevTree tree2 = tree(50, db);
final RevTree tree2Changed;
{
RevTreeBuilder builder = new RevTreeBuilder(db, tree2);
// add 10 changed features, and delete 10 more
for (int i = 0; i < 20; i++) {
if (i % 2 == 0) {
builder.remove(String.valueOf(i));
} else {
builder.put(feature(i, ObjectId.forString("changed" + i)));
}
}
tree2Changed = builder.build();
db.put(tree2Changed);
assertEquals(tree2.size() - 10, tree2Changed.size());
}
final RevTree root1 = createRoot(db, tree1, tree2);
final RevTree root2 = createRoot(db, tree1, tree2Changed);