patchatlassian-crucible

Crucible tried to anchor your patch, but there was conflicting content


I'm trying to use Crucible with CVS for precommit review. When I upload the patch, it says

Crucible tried to anchor your patch, but there was conflicting content

Apparently this is a common problem. hits in jira.

All my files have keyword tag $Log: NameOfTheFile.java,v $ and this seems to be the culprit. If I remove the tag and commit, the problem goes away -- I can upload precommit patches to Crucible. However I do not want to remove all the keyword tags from my files.

Is there any other work-around? One page says I can manually edit the diff. How??


Solution

  • The problem is that CVS expands the keyword during checkout. Therefore the copy of the file in CVS has the unexpanded tag, but the copy on your PC has the expanded tag. This is what causes the anchor to fail. In the case of $Log$ the expansion adds three lines after the tag. To make the anchor work you have to edit the patch such that those three lines disappear. You have two options

    1. generate the patch with all lines, cvs diff -u100000, and then edit the patch to remove the three lines after the $Log$, or
    2. generate the patch with limited context, cvs diff -u, and then edit the patch to subtract 3 from all the "@@" lines. For instance if the patch contains "@@ -116,63 +109,50 @@" you will need to change it to "@@ -113,63 +106,50 @@"

    This is related to the off by one bug when you look at the log in the CVS file.