• If a file is hg rm file and then hg cp other file, the diff just shows a modification (to the same named file), but the meta information in hgfelog.py says it is a copy and the parent rev is the rev id of the parent where it was copied from - so:
        1. That revision of the named file may not exist (as it is actually a rev of the copy source)
        2. If we use the copy source, we don't have the right diffs to properly calculate the LOC.
      • If there was no revision of the copy target in the parent commit, (i.e. a copy over something that was deleted a while ago), the diff will work properly, diffing to the copy source and we can use that as the predecessor/ancestor.

            [FE-3134] HG: Cope with copies over deleted files

            Atlassian Update – 5 October 2018

            Hi everyone,

            This issue has been reported several years ago for version older than 3.0.0, which is over 18 major releases behind the latest Fisheye/Crucible version. Additionally, it has not get interest since the time it has been reported. Therefore, we decided to close the issue as Timed Out.

            If you still see this bug occurring in the latest release and a fix is very important for you, please don't hesitate to share your feedback in the issue comments. We will continue to watch the issue for further updates.

            Cheers

            Marek Parfianowicz

            Fisheye/Crucible TL

            Marek Parfianowicz added a comment - Atlassian Update – 5 October 2018 Hi everyone, This issue has been reported several years ago for version older than 3.0.0, which is over 18 major releases behind the latest Fisheye/Crucible version. Additionally, it has not get interest since the time it has been reported. Therefore, we decided to close the issue as Timed Out . If you still see this bug occurring in the latest release and a fix is very important for you, please don't hesitate to share your feedback in the issue comments. We will continue to watch the issue for further updates. Cheers Marek Parfianowicz Fisheye/Crucible TL

            mwatson added a comment -

            FECRU-63: Mean that we now correctly identify the copy source and diff against it, but the +-loc counts are wrong, as we assume a copy is a copy/add rather than differentiating between copy/add and copy/replace.

            To fix this, we need to get the hg extension to tell differentiate these two and for a copy/replace, tell us the file that is being replaced, so we can correct the LoC for this case.

            mwatson added a comment - FECRU-63: Mean that we now correctly identify the copy source and diff against it, but the +-loc counts are wrong, as we assume a copy is a copy/add rather than differentiating between copy/add and copy/replace. To fix this, we need to get the hg extension to tell differentiate these two and for a copy/replace, tell us the file that is being replaced, so we can correct the LoC for this case.

            mwatson added a comment -

            TODO:

            • Make the hg extension detect a copy over an existing file
            • Get it to list the predecessor revision
            • List the ancestor path and revision
            • Get the slurper to parse this and set this data up in HgScanner.processModification()
              Note: the diff to the parent is fine - produces the right LOC

            mwatson added a comment - TODO: Make the hg extension detect a copy over an existing file Get it to list the predecessor revision List the ancestor path and revision Get the slurper to parse this and set this data up in HgScanner.processModification() Note: the diff to the parent is fine - produces the right LOC

            mwatson added a comment -

            The only way to deal with this may be to detect in the plugin that a file is being copied over a file that existed in the parent revision, and use that file as the parent instead - lost the information about where the file was copied from, but LOC would be consistent, if less accurate.

            mwatson added a comment - The only way to deal with this may be to detect in the plugin that a file is being copied over a file that existed in the parent revision, and use that file as the parent instead - lost the information about where the file was copied from, but LOC would be consistent, if less accurate.

              Unassigned Unassigned
              Anonymous Anonymous
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 8h
                  8h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified