Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-7177

Error when adding a commit with deleted file with "Diff to..." mode selected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • 3.6.3
    • None

    Description

      Repro.

      I will use D to denote a Delete, N to denote a 'Nothing' (no actions with the file), C to denote a Change and A to denote an Add.
      Given these notations a AA means that file is added both in left branch and the right branch and DC means the file is deleted in left branch and changed in right. _Same means changes are the same in two branches and _Diff means the changes are different. For example AA_Same means that the file was added in both branches and content is the same.

      We have a total number of 12 possible combinations in 2 branches: DD, DN, DC, ND, NN, NC, CD, CN, CC_Same, CC_Diff, AA_Same, AA_Diff (I have simplified the example, in real life you have 3 ways to resolve the conficts: left, right, manual... but this is already complex enough).

      Branch A, we create empty files: DD, DN, DC, ND, NN, NC, CD, CN, CC_Same, CC_Diff

      Branch B (from A), we modify files this way:

      1. Delete files: DD, DN, DC
      2. Change files:
        1. CD the content should be 'change'
        2. CN the content should be 'change'
        3. CC_Same the content should be 'same'
        4. CC_Diff the content should be 'diff1'
      3. Add files:
        1. AA_Same the content should be 'same'
        2. AA_Diff the content should be 'diff1'

      Lets say this commit has the hash hash1.

      Branch C (from A), we modify files this way:

      1. Delete files: DD, ND, CD
      2. Change files:
        1. DC the content should be 'change'
        2. NC the content should be 'change'
        3. CC_Same the content should be 'same'
        4. CC_Diff the content should be 'diff2'
      3. Add files:
        1. AA_Same the content should be 'same'
        2. AA_Diff the content should be 'diff2'

      Now merge branch B (hash1) into C. Lets say this commit has the hash hash2. ()

      IMPORTANT you need to make a change, that has not been seen yet (like resolve the conflict with 'diff3'), if you do not do so, crucible will not show your commit (if you find it manually it will say 'No files modified'). ()

      Add commit hash2 into review ():
      instead of all the changes from branch B you see only the 'modifications' you made while resolving the conflict ('diff3').

      If you try to force crucible to compare revisions selecting "Diffs to..." in "Add to Review as" dropdown and typing hash1 in "From revision" field (), the error pops out:

      Error
      Server Error
      Error 2
      URL: /json/cru/CR-VTBRTLB-3154/editRevisionsAjax/
      A java.lang.NullPointerException was encountered
      Couldn't find this revision with key AA_Diff.txt@ed346b40b53057803415d69772314ef98f28b4c3 in repository VTBR-TLB_auxiliary
      You are running release CR3.6.3 FE3.6.3 (20141229134624 2014-12-29), please report your release number when reporting bugs.
      Got a suggestion or an issue?
      Discuss it in our forums or visit our support website for other options.

      Expected Result:
      review should contain the same stuff that is displayed in SourceTree: 5 files, 2 deleted and 3 changed with proper changes.

      Attachments

        1. 1.png
          1.png
          124 kB
        2. 2.png
          2.png
          69 kB
        3. 3.png
          3.png
          40 kB
        4. 5.png
          5.png
          116 kB
        5. 6.png
          6.png
          126 kB
        6. 7.png
          7.png
          46 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              c15cece6573c Alexey Polyakov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: