4600: empty files are irritating the diff-view


What version are you running?


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


What steps will reproduce the problem?

  1. commit an empty file with 0 bytes and push it into the reviewboard

The resulting output

The empty file is correctly displayed in the diff-view, but the diff-view does also create a second entry of the file with the same name and a timestamp behind the filename.
In my case I got an empty css-file that gets now filled with java-code in the reviewboard from another test-class.

#1 Misery

Looks like the problem is rbtools with Mercurial.

$ rbt diff
Please log in to the Review Board server at reviewboard.
diff --git a/bla b/bla
new file mode 100644
diff -r 9264e470c193 -r bac4e0592ecc bla
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bla Wed Nov 29 15:07:51 2017 +0100

The "bla" file has a duplicated entry. Mercurial supports git-diff like patches. So the work-around in clients/mercurial.py --> "supports_empty_files" should be removed.

#2 david

Fixed in release-0.7.x (3cdf6de). This will ship in RBTools 0.7.11. Thanks!

  • -New