Package org.tmatesoft.hg.internal

Examples of org.tmatesoft.hg.internal.Transaction.rollback()


    cf.add(dfB, new FileContentSupplier(hgRepo, modifiedFile));
    cf.forget(dfD);
    cf.branch("another-branch");
    Transaction tr = newTransaction(hgRepo);
    Nodeid commitRev = cf.commit("Commit to fail",  tr);
    tr.rollback();
    //
    errorCollector.assertEquals(lastClogRevision, hgRepo.getChangelog().getLastRevision());
    errorCollector.assertEquals(lastManifestRev, hgRepo.getManifest().getLastRevision());
    errorCollector.assertEquals(DEFAULT_BRANCH_NAME, DirstateReader.readBranch(Internals.getInstance(hgRepo)));
    errorCollector.assertFalse(hgRepo.getChangelog().isKnown(commitRev));
View Full Code Here


      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) {
View Full Code Here

        tr.commit();
      } catch (HgRuntimeException ex) {
        tr.rollback();
        throw ex;
      } catch (HgIOException ex) {
        tr.rollback();
        throw ex;
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      }
View Full Code Here

        throw ex;
      } catch (HgIOException ex) {
        tr.rollback();
        throw ex;
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      }
      progress.worked(45);
      added = insp.addedChangesets();
     
View Full Code Here

      Transaction tr = trFactory.create(repo);
      try {
        newRevision = cf.commit(message, tr);
        tr.commit();
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      } catch (HgException ex) {
        tr.rollback();
        throw ex;
      }
View Full Code Here

        tr.commit();
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      } catch (HgException ex) {
        tr.rollback();
        throw ex;
      }
      return new Outcome(Kind.Success, "Commit ok");
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
View Full Code Here

          resolver.apply();
        }
        resolver.serializeChanged(transaction);
        transaction.commit();
      } catch (HgRuntimeException ex) {
        transaction.rollback();
        mergeStateBuilder.abandon();
        throw ex;
      } catch (HgIOException ex) {
        transaction.rollback();
        mergeStateBuilder.abandon();
View Full Code Here

      } catch (HgRuntimeException ex) {
        transaction.rollback();
        mergeStateBuilder.abandon();
        throw ex;
      } catch (HgIOException ex) {
        transaction.rollback();
        mergeStateBuilder.abandon();
        throw ex;
      }
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
View Full Code Here

    File tf3 = tr2.prepare(f3);
    errorCollector.assertTrue(tf3.exists());
    RepoUtils.modifyFileAppend(tf3, "!");
    tr2.done(tf3);
    errorCollector.assertEquals("!", read(tf3));
    tr2.rollback();
    errorCollector.assertTrue(f1.isFile());
    errorCollector.assertTrue(f2.isFile());
    errorCollector.assertFalse(f3.isFile());
    errorCollector.assertEquals("12", read(f1));
    errorCollector.assertEquals("A", read(f2));
View Full Code Here

      Transaction tr = trFactory.create(repo);
      try {
        dirstateBuilder.serialize(tr);
        tr.commit();
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      } catch (HgException ex) {
        tr.rollback();
        throw ex;
      }
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.