3485: revision deltas on side-by-side diff screen does not work for mercurial patches

s.a.h******@gmai***** (Google Code) (Is this you? Claim this profile.)
What version are you running?

Review Board 2.0.2

What's the URL of the page containing the problem?

/r/16/diff/1-2/

This is purely exemplary; the problem exists with viewing deltas between revisions.

What steps will reproduce the problem?

Performing post commit review, from a branch I would like reviewed for inclusion into default, I perform the following to create the review on the server:

$ hg diff -r default >/tmp/mytmpdiff
$ cat >/tmp/mytmpdesc
Enter description of changes ...
^D
$ rbt post -o -p --markdown --diff-filename /tmp/mytmpdiff --summary "my summary" --description-file /tmp/mytmpdesc
Review request #16 posted.
...

Now, let's assume I get feedback and update my branch.  I now submit an updated review as follows:

$ hg diff -r default >/tmp/mytmpdiff
$ rbt post -o -p --diff-filename /tmp/mytmpdiff -r 16 --change-description "I fixed the stuff"
Review request #16 posted.
...

Now, if I go to the diff viewer for this review, there is no difference in the diff output between viewing the following URL which displays the entire changes:

/r/16/diff/

and the following URL which purports to show the delta between the first and second set of changes:

/r/16/diff/1-2/

What is the expected output? What do you see instead?

When I perform the identical task on a separately configured repository using git instead of mercurial, I see the deltas operate properly.  Viewing the /r/16/diff/1-2/ URL (eg) would correctly show the changes that were only introduced by the delta between patch changes.

What operating system are you using? What browser?

OS for web client is OS X Mavericks.  Browser is Chrome 35.0.1916.153.

Please provide any additional information below.
david
#1 david
Why are you creating your diffs by hand instead of letting rbt post create them?
#2 s.a.h******@gmai***** (Google Code) (Is this you? Claim this profile.)
Sigh.  I take this back .. partially.  Viewing the /r/16/diff/1-2/ URL displays all the files that changed in the entire review, but it does accurately only display patch coloring (green/red) for the files that changed between 1 and 2.  

The difference here with git is that the delta output only displays the files that changed in the delta revision.


#3 s.a.h******@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm creating my diffs by hand primarily because it's the easiest way to review exactly the changes between the branch and default.  

As I understand it, rbt post interacts with the hg repo in pre commit mode by looking for "hg out" commits and in post commit mode by a specified range.  I could specify that I want to review the changes on the branch with something like this (it's how I started):

$ branch=`hg branch`
$ rbt post `hg log -b $branch --template '{node} ' | awk '{ print $NF ".." $1 }'`

.. but that has the disadvantage that I'm going to review merge commits.  Merging default into the feature branch is not something I want to bother reviewing.  I want to exactly review the output of:

$ hg diff -r default

which is why I'm generating it manually.
david
#4 david
  • -New
    +UserError