Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to toggle between full and incremental diff in a pull request

Michael Adelson January 11, 2017

In what seems to be a change caused by a recent update, I've noticed that sometimes pull requests I'm an approver on will silently switch to only showing the diff between the original PR commits and the earlier PR commits instead of the full diff between the PR branch and the destination branch. This typically happens when:

  • Someone files a pull request putting me as an reviewer
  • I add some comments/tasks and then mark as approved
  • The person adds new code to the PR (perhaps addressing the comments from myself or other reviewers)
  • I revisit the PR, and now I can only see the incremental changes

This is quite frustrating, since I almost always want to view the full diff. I want to know:

  • How do I toggle back to seeing the full diff?
  • Is it possible to disable the behavior which silently switches the PR to the "incremental diff" mode?

2 answers

1 accepted

1 vote
Answer accepted
Stefan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2017

Hi Michael,

In Bitbucket Server 4.11, a new feature was added called iterative review. You can find out more about it in this blog postthe release notes, or the related JIRA ticket.

As a reviewer, iterative review allows you to easily see all of the changes since you last reviewed a pull request. As you've noticed, the diff view in a pull request now defaults to showing your unreviewed changes if they exist. Any changes an author pushes after you mark the pull request as "Needs Work" or "Approved" are considered unreviewed.

However, if you would prefer to see all changes in the pull request (the "effective diff", or what you've referred to as the "full diff"), you can select this option from the commit selector, which is above the file tree in the pull request diff view. Opening the commit selector will allow you to select between all changes in the pull request, your unreviewed changes (if they exist), or even the changes that a particular commit introduces. 

IterativeReview.png

There is currently no way to disable showing the diff of unreviewed changes by default if unreviewed changes exist.

Kind regards,
Stefan Petrucev
Atlassian Bitbucket 

0 votes
Michael Adelson January 12, 2017

Thanks @Stefan Petrucev this was exactly the toggle I was looking for.

As feedback, I think the UI could do a bit more to make this obvious, and it would be nice to be able to change the default behavior. A couple examples where this behavior has caused frustration for us:

  • Someone updates the PR with a fairly significant changeset, which can make it non-obvious that what you are reviewing is not the full changeset
  • Frequently, one reviewer will come in first, make a bunch of comments, and mark the review as "needs work". Other reviewers will often see the review in this state and mark "needs work" as well with just a skim as a way of signaling to the author that they won't be engaging further until the initial comments are addressed. When those other reviewers come back to the review later, they want to see the full changeset by default
  • Recently, I was reviewing a PR where the author had added two new functions to a public API. We iterated a bit on one API function, and due to changes made there the other API function had become irrelevant. We almost merged without removing the now-irrelevant function because stash was showing only the incremental diff which only focused on one of the two functions

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events