Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-3160

ClearCase support for moving and renaming files is lacking

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.6.6
    • 2.4.0
    • Indexing

    Description

      ClearCase does have support for moving and renaming files, but FishEye doesn't pick up the changes.

      In ClearCase when you move a file, it moves the whole version tree and lshistory will show only the new file location. There is no new version created in the file revision tree, so there the whole move is missed by FishEye. FishEye does process directory diffs in order to detect deletions and will create a deleted revision for the 'moved from' path.

      This shortcoming results in a number of symptoms:

      • When a file is moved, FishEye marks it as deleted, but does not create an 'added' revision for the file. The moved file will 'disappear' until a change is made to the file.
      • When a file is moved and replaced in a single commit (of the parent directory), an parent-of link will be incorrectly set up between the two revisions at the old path.

      There is a way to find the new location however. A file revisions objectId will stay the same and we can get the new path from CC by using the objectId. So the way to go would be:

      1. detect directory modification event when the contents have changed. This can be fairly complex, because we need to deal with all sorts of scenarios: file A being moved and a new file A being added as a replacement.
      2. if the directory has changed, and a file has been removed, get the objectId from the latest fileRevision that we've got. Get the new path from CC by using the objectId.
      3. create 2 new file revisions:
        1. a delete revision for the old location (if needed?)
        2. a moved revision for the new location with the appropriate ancestor links

      Moves / renames are actually returned by cleartool diff -pre -ser for directory revisions. We're already getting the data in the ClearCaseDirectoryDiffParser, but we're currently only looking for deletes.

      Attachments

        Activity

          People

            mheemskerk Michael Heemskerk (Inactive)
            Anonymous Anonymous
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: