Replace custom supports_empty_files by git-style diff

Review Request #9412 - Created Nov. 30, 2017 and updated

André Klitzing
RBTools
release-0.7.x
4600
09b0453...
rbtools
Previous work-around for support of empty files
will collide with Mercurial's capability of
generating git-style diffs.
If Mercurial generates a diff with '-g' it also
contain any empty file. So there is no need
to handle thse data by rbtools itself.

Otherwise "rbt diff" will generate something
like this duplicate entry:

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

Bug closed: 4600

Created a diff before applying this patch I saw that it
has a duplicated enty. Applied this patch and saw no
duplicated entry and no broken "rename from /dev/null"
with a date in diff-viewer of reviewboard.

André Klitzing
  1. 
      
  2. rbtools/clients/mercurial.py (Diff revision 1)
     
     

    is this necessary?

  3. 
      
André Klitzing
Review request changed

Testing Done:

  +

Created a diff before applying this patch I saw that it

  + has a duplicated enty. Applied this patch and saw no
  + duplicated entry and no broken "rename from /dev/null"
  + with a date in diff-viewer of reviewboard.

Christian Hammond
  1. Ship It!
  2. 
      
David Trowbridge
  1. Ship It!
  2. 
      
Loading...