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

Incorrect error handling with Perforce can lead to missing metadata for some file revisions

    XMLWordPrintable

Details

    Description

      Actual behaviour

      Currently when any perforce related error happens when FishEye tries to get p4 filelog for a batch of file revisions, it tries to fall back recursively. It splits the batch and tries to get information for smaller batches. 

      Code which splits list is broken and leads to throwing away last element of that list.

      File: com.cenqua.fisheye.perforce.client.P4Client#execFilelog

      int size = fileList.size(); 
      if (size > 1) { 
         int midPoint = size / 2; 
         execFilelog(changeLists, fileList.subList(0, midPoint), importMode); 
         execFilelog(changeLists, fileList.subList(midPoint, size - 1), importMode);
      }

       

      Impact

      Because of this bug some file revisions will have incorrect metadata being associated with them, e.g. Java Text file will can be marked as binary revision.

       

      Expected behaviour 

      FishEye correctly handles which come from Perforce, correctly fallbacks from batch mode and does not loose any file revision information. In case of persistent errors, propagate the exception into upper callee levels.

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          39 kB
        2. screenshot-2.png
          screenshot-2.png
          58 kB

        Issue Links

          Activity

            People

              glewandowski Grzegorz Lewandowski
              glewandowski Grzegorz Lewandowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: