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

Revisions from closed heads are considered ancestors for files

    XMLWordPrintable

Details

    Description

      Edit: I managed to reproduce this and have rephrased the title to denote the root cause:

      When indexing the repo provided, the revision from the closed head is indexed as the ancestor for the file, while it's not really in it's ancestry. This causes the issue reported.

      Original description follows:

      When creating a review using the Branch Review feature for a Mercurial repository, if there is a grafted commit, it can cause the incorrect diff to be generated.

      Steps to reproduce

      Use the attached crc-8134.zip repository and create a Branch Review for the feature branch with default as the base. The branch review will show the correct commits are being included:

      But the review that is created is incorrect:

      The review shows that the diff was created between 00656ac and 6a9681e. 00656ac is the commit that was grafted from a closed branch.

      Repository was created using the following steps:

      1. Commit to the default branch
      2. Create a feature branch from default
      3. Close the default branch
      4. Commit to the feature branch
      5. Graft a commit from the closed default branch to the feature branch
      6. Create a new default branch from a commit before the commit used in the graft above
      7. Merge the default branch into feature

      Expected results

      Branch review should not include the commit from the base branch and display the following diff. The following diff is expected:

      hg diff -r default:feature
      diff -r 1c8ba5473fe2 -r 6a9681ed2688 branch.txt
      --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
      +++ b/branch.txt	Mon Apr 06 12:34:13 2015 -0500
      @@ -0,0 +1,1 @@
      +First commit on feature branch
      \ No newline at end of file
      diff -r 1c8ba5473fe2 -r 6a9681ed2688 important.txt
      --- a/important.txt	Mon Apr 06 12:32:34 2015 -0500
      +++ b/important.txt	Mon Apr 06 12:34:13 2015 -0500
      @@ -1,2 +1,4 @@
       First commit on default
      -Second commit on default
      \ No newline at end of file
      +Second commit on default
      +Third commit on default
      +Fourth commit on feature branch
      \ No newline at end of file

      Workaround

      Use the Browse Changesets option when creating the review and manually select the commits on the branch.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jethomas Jeff Thomas
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: