// get bundle with changes from remote
HgBundle incoming = remote.getChanges(common);
//
// add revisions to changelog, manifest, files
final Internals implRepo = HgInternals.getImplementationRepo(repo);
final AddRevInspector insp;
Transaction.Factory trFactory = implRepo.getTransactionFactory();
Transaction tr = trFactory.create(repo);
try {
incoming.inspectAll(insp = new AddRevInspector(implRepo, tr));
insp.done();
tr.commit();
} catch (HgRuntimeException ex) {
tr.rollback();
throw ex;
} catch (HgIOException ex) {
tr.rollback();
throw ex;
} catch (RuntimeException ex) {
tr.rollback();
throw ex;
}
progress.worked(45);
added = insp.addedChangesets();
if (!added.isEmpty()) {
parentHelper.init(); // refresh the map, we use it for phases below
}
// get remote phases, update local phases to match that of remote