com.cenqua.crucible.revision.diff.patchDiff.PatchException: Patch did not apply cleanly to FishEye repository at line 3072

Atlassian JIRA | Kah Loun Foong [Atlassian] | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3.Steps to reproduce: # Create a CRLF ending file and upload it to a SVN repository # Modify the file and get the diff # Create a Crucible review # Upload the diff/patch to the review through REST: {noformat} curl -u admin:admin -X POST -d @patch http://localhost:8060/rest-service/reviews-v1/CR-15/patch -H "Content-Type: application/json" {noformat} # The uploaded patch fail to anchor to a revision # The following appear in the log: {noformat} 2012-12-25 21:03:38,113 DEBUG [btpool0-13 ] fisheye.perf ProfilingServletFilter-logRequest - start request POST /json/cru/CR-15/anchor-patch/?stripCount=0&anchorSource=svntest&anchorPath=branches%2FbranchA&patchId=21 sessionid=1xorcruijqztcabbwisefqzi1 2012-12-25 21:03:38,126 DEBUG [btpool0-13 ] fisheye.perf RepositoryHandle-acquire - acquire engine on svntest, count=1 2012-12-25 21:03:38,129 DEBUG [btpool0-13 ] fisheye.app SvnThrottledClient-start - Executing cat -r 15 http://localhost:8080/subversion/branches/branchA/DemoApp.cpp@15 2012-12-25 21:03:38,186 DEBUG [btpool0-13 ] fisheye.app PatchSource-validateAnchorContent - Anchor validation failed com.cenqua.crucible.revision.diff.patchDiff.PatchException: Patch did not apply cleanly to FishEye repository at line 3072 at com.cenqua.crucible.revision.source.PatchSource.applyPatchDiff(PatchSource.java:216) at com.cenqua.crucible.revision.source.PatchSource.validateAnchorContent(PatchSource.java:322) at com.cenqua.crucible.util.PatchAnchorHelper.anchorPatchRevisions(PatchAnchorHelper.java:223) at com.atlassian.crucible.actions.create.AnchorPatchAjaxAction.execute(AnchorPatchAjaxAction.java:195) at sun.reflect.GeneratedMethodAccessor1133.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) {noformat} # When trying to set the anchor manually from the UI, the following error appear: {noformat} Crucible tried to anchor your patch to 'svntest', but there was conflicting content in 'branches/branchA/DemoApp.cpp' at revision '15'. You may not be able to see full context diffs. {noformat} # Adding the diff/patch file directly from the UI works Tested attaching from UI will have the same problem for FishEye/Crucible 2.8.2

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    com.cenqua.crucible.revision.diff.patchDiff.PatchException: Patch did not apply cleanly to FishEye repository at line 3072
  2. 0

    h3.Steps to reproduce: # Create a CRLF ending file and upload it to a SVN repository # Modify the file and get the diff # Create a Crucible review # Upload the diff/patch to the review through REST: {noformat} curl -u admin:admin -X POST -d @patch http://localhost:8060/rest-service/reviews-v1/CR-15/patch -H "Content-Type: application/json" {noformat} # The uploaded patch fail to anchor to a revision # The following appear in the log: {noformat} 2012-12-25 21:03:38,113 DEBUG [btpool0-13 ] fisheye.perf ProfilingServletFilter-logRequest - start request POST /json/cru/CR-15/anchor-patch/?stripCount=0&anchorSource=svntest&anchorPath=branches%2FbranchA&patchId=21 sessionid=1xorcruijqztcabbwisefqzi1 2012-12-25 21:03:38,126 DEBUG [btpool0-13 ] fisheye.perf RepositoryHandle-acquire - acquire engine on svntest, count=1 2012-12-25 21:03:38,129 DEBUG [btpool0-13 ] fisheye.app SvnThrottledClient-start - Executing cat -r 15 http://localhost:8080/subversion/branches/branchA/DemoApp.cpp@15 2012-12-25 21:03:38,186 DEBUG [btpool0-13 ] fisheye.app PatchSource-validateAnchorContent - Anchor validation failed com.cenqua.crucible.revision.diff.patchDiff.PatchException: Patch did not apply cleanly to FishEye repository at line 3072 at com.cenqua.crucible.revision.source.PatchSource.applyPatchDiff(PatchSource.java:216) at com.cenqua.crucible.revision.source.PatchSource.validateAnchorContent(PatchSource.java:322) at com.cenqua.crucible.util.PatchAnchorHelper.anchorPatchRevisions(PatchAnchorHelper.java:223) at com.atlassian.crucible.actions.create.AnchorPatchAjaxAction.execute(AnchorPatchAjaxAction.java:195) at sun.reflect.GeneratedMethodAccessor1133.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) {noformat} # When trying to set the anchor manually from the UI, the following error appear: {noformat} Crucible tried to anchor your patch to 'svntest', but there was conflicting content in 'branches/branchA/DemoApp.cpp' at revision '15'. You may not be able to see full context diffs. {noformat} # Adding the diff/patch file directly from the UI works Tested attaching from UI will have the same problem for FishEye/Crucible 2.8.2

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    com.cenqua.crucible.revision.diff.patchDiff.PatchException: Patch did not apply cleanly to FishEye repository at line 3072

    Root Cause Analysis

    1. com.cenqua.crucible.revision.diff.patchDiff.PatchException

      Patch did not apply cleanly to FishEye repository at line 3072

      at com.cenqua.crucible.revision.source.PatchSource.applyPatchDiff()
    2. com.cenqua.crucible
      PatchAnchorHelper.anchorPatchRevisions
      1. com.cenqua.crucible.revision.source.PatchSource.applyPatchDiff(PatchSource.java:216)
      2. com.cenqua.crucible.revision.source.PatchSource.validateAnchorContent(PatchSource.java:322)
      3. com.cenqua.crucible.util.PatchAnchorHelper.anchorPatchRevisions(PatchAnchorHelper.java:223)
      3 frames
    3. com.atlassian.crucible
      AnchorPatchAjaxAction.execute
      1. com.atlassian.crucible.actions.create.AnchorPatchAjaxAction.execute(AnchorPatchAjaxAction.java:195)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1133.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames