Examples of patch()


Examples of net.minecraftforge.gradle.patching.ContextualPatch.patch()

    }

    private void applySingleMcpPatch(File patchFile) throws Throwable
    {
        ContextualPatch patch = ContextualPatch.create(Files.toString(patchFile, Charset.defaultCharset()), new ContextProvider(sourceMap));
        printPatchErrors(patch.patch(false));
    }

    private void printPatchErrors(List<PatchReport> errors) throws Throwable
    {
        boolean fuzzed = false;
View Full Code Here

Examples of net.minecraftforge.gradle.patching.ContextualPatch.patch()

            {
                getLogger().lifecycle("Patch not found for set: " + key); //This should never happen, but whatever
            }
            else
            {
                printPatchErrors(patch.patch(false));
            }
        }
    }

    private ContextualPatch findPatch(Collection<File> files) throws Throwable
View Full Code Here

Examples of net.minecraftforge.gradle.patching.ContextualPatch.patch()

    {
        ContextualPatch patch = null;
        for (File f : files)
        {
            patch = ContextualPatch.create(Files.toString(f, Charset.defaultCharset()), new ContextProvider(sourceMap));
            List<PatchReport> errors = patch.patch(true);
           
            boolean success = true;
            for (PatchReport rep : errors)
            {
                if (!rep.getStatus().isSuccess()) success = false;
View Full Code Here

Examples of org.apache.commons.jrcs.diff.Revision.patch()

            System.out.print(r.toString());
            System.err.println("------" + new Date());

            try
            {
                Object[] reco = r.patch(orig);
                //String recos = Diff.arrayToString(reco);
                if (!Diff.compare(rev, reco))
                {
                    System.err.println("INTERNAL ERROR:"
                                        + "files differ after patching!");
View Full Code Here

Examples of org.exist.versioning.Patch.patch()

            DocumentBuilderReceiver receiver = new DocumentBuilderReceiver(builder);
            Patch patch = new Patch(context.getBroker(), diff);
            if (isCalledAs("annotate"))
                patch.annotate(reader, receiver);
            else
                patch.patch(reader, receiver);
            NodeValue result = (NodeValue) builder.getDocument().getDocumentElement();
            return result == null ? Sequence.EMPTY_SEQUENCE : result;
        } catch (IOException e) {
            throw new XPathException(this, e.getMessage(), e);
        } catch (XMLStreamException e) {
View Full Code Here

Examples of org.exoplatform.services.document.diff.Delta.patch()

   {
      ListIterator i = deltas_.listIterator(deltas_.size());
      while (i.hasPrevious())
      {
         Delta delta = (Delta)i.previous();
         delta.patch(target);
      }
   }

   /*
    * (non-Javadoc)
 
View Full Code Here

Examples of org.exoplatform.services.document.diff.Revision.patch()

   {
      DiffService diffService = new DiffServiceImpl(getAlgo());
      Revision revision = diffService.diff(original, empty);
      assertEquals(1, revision.size());
      assertTrue(revision.getDelta(0) instanceof DeleteDelta);
      assertTrue(diffService.compare(revision.patch(original), empty));
   }

   public void testTwoDeletes() throws Exception
   {
      DiffService diffService = new DiffServiceImpl(getAlgo());
View Full Code Here

Examples of org.exoplatform.services.document.diff.Revision.patch()

      DiffService diffService = new DiffServiceImpl(getAlgo());
      Revision revision = diffService.diff(original, rev1);
      assertEquals(2, revision.size());
      assertTrue(revision.getDelta(0) instanceof DeleteDelta);
      assertTrue(revision.getDelta(1) instanceof DeleteDelta);
      assertTrue(diffService.compare(revision.patch(original), rev1));
      assertEquals("3d2" + DiffService.NL + "< [3] three" + DiffService.NL + "9d7" + DiffService.NL + "< [9] nine"
         + DiffService.NL, revision.toString());
   }

   public void testChangeAtTheEnd() throws Exception
View Full Code Here

Examples of org.exoplatform.services.document.diff.Revision.patch()

   {
      DiffService diffService = new DiffServiceImpl(getAlgo());
      Revision revision = diffService.diff(original, rev2);
      assertEquals(1, revision.size());
      assertTrue(revision.getDelta(0) instanceof ChangeDelta);
      assertTrue(diffService.compare(revision.patch(original), rev2));
      assertEquals("d7 3" + DiffService.NL + "a9 2" + DiffService.NL + "[7] seven revised" + DiffService.NL
         + "[8] eight revised" + DiffService.NL, revision.toRCSString());
   }

   public void testPatchFailed() throws Exception
View Full Code Here

Examples of org.exoplatform.services.document.diff.Revision.patch()

   {
      try
      {
         DiffService diffService = new DiffServiceImpl(getAlgo());
         Revision revision = diffService.diff(original, rev2);
         assertTrue(!diffService.compare(revision.patch(rev1), rev2));
         fail("Exception not thrown");
      }
      catch (Exception e)
      {
      }
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.