1466: Support for Mercurial --git diffs

resi.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
March 22, 2011
board.org/


What version are you running?
1.0.1


What's the URL of the page this enhancement relates to, if any?


Describe the enhancement and the motivation for it.
ReviewBoard cannot deal with patches generated using 
  hg diff --git

Currently post-review fails:
...
>>> Review request draft saved
>>> Uploading diff, size: 195
>>> HTTP POSTing to
http://<reviewboard>/reviews/api/json/reviewrequests/503/diff/new/: {}
Error uploading diff: One or more fields had errors (105)
>>> {'fields': {'path': ['The diff file is empty']}, 'stat': 'fail', 'err':
{'msg': 'One or more fields had errors', 'code': 105}}
Your review request still exists, but the diff is not attached.


What operating system are you using? What browser?
Archlinux, Firefox 3.5.7

Please provide any additional information below.
--git diffs have a nice presentation of file moves, thats why I (and
appearently others) set hg defaults to use --git diffs.
#1 resi.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
seems like issue 1463 is related, as p4 generates "special" diff lines for moved files.
david
#2 david
  • +Component-DiffParser
    +Component-SCMTools
    +Component-RBTools
david
#3 david
Fixed in master as 044afe1.

Note that the uploaded diff files must include the "Node ID" and "Parent" headers as
generated by "hg export". This is the only way ReviewBoard can know the
original and new changeset IDs.
  • +Fixed