Context expansion and syntax highlighting for pull request diffs for large files

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Pull Requests, UI
    • None
    • 1
    • 2

      Feature request

      Add back context expansion and syntax highlighting for pull request diffs for large files in Bitbucket 7.x.

      These were previously available in Bitbucket 6.x.

      In Bitbucket 7.x, PR diffs for large files (files over 10K lines, which is set by the page.max.diff.lines property will show the message: "This file is too large to fetch the full context for the diff. Syntax highlighting and context expansion have been disabled. View the entire source for this file"

      Bitbucket 7.x sample screenshot

      The diff is shown with minimal context (10 lines each side of change) and it is not possible to show more lines.

      Bitbucket 6.x sample screenshot

      In comparison, in Bitbucket 6.x, it is possible to show more lines as long as the diff doesn't exceed 10K lines

      Workarounds

      Workaround 1

      1. In the PR diff, click "View the entire source for this file"
      2. In the Source view, click "Diff to previous"

      Workaround 2

      1. Set page.max.diff.lines=<number of lines in your largest file you expect to work with> in the bitbucket.properties file
      2. Restart Bitbucket

      Note: This setting can cause performance overhead. It is recommended to test this setting in a controlled environment first.

        1. bb6-large-file-context-expansion.png
          515 kB
          JP Mariano
        2. bb7-large-file-no-context-expansion.png
          551 kB
          JP Mariano

              Assignee:
              Unassigned
              Reporter:
              JP Mariano
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: