4799: rbt diff Index line only show file name and "rbt diff" line ending contains extra "\r"

jackdai

What version of Djblets are you using?

Windows RBTools 1.0.1
svn, version 1.9.7

What steps will reproduce the problem?

  1. Checkout from a repo and modify a file
  2. run rbt diffIndex: test1
    C:\test>rbt diff
    Index: test1
    ===================================================================
    --- /TestProject/branches/5.x/relax/Test/test1 (revision 30075)
    +++ /TestProject/branches/5.x/relax/Test/test1 (working copy)
    @@ -1 +1,2 @@
    Mon Jan 28 15:05:10 PST 2019
    +testtt

  3. run python2 and print repr(diff)
    'Index: test1\r\r\n===================================================================\r\r\n--- /TestProject/branches/5.x/relax/Test/test1\t(revision 30075)\r\r\n+++ /TestProject/branches/5.x/relax/Test/test1\t(working copy)\r\r\n@@ -1 +1,2 @@\r\r\n Mon Jan 28 15:05:10 PST 2019\r\r\n+testtt\r\r\n\ No newline at end of file\r\r\n\r\n'

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

In Windows RBTools 0.7.11, index path is consisent with the file change path
C:\test>rbt diff
Index: /TestProject/branches/5.x/relax/Test/test1
===================================================================
--- /TestProject/branches/5.x/relax/Test/test1 (revision 30075)
+++ /TestProject/branches/5.x/relax/Test/test1 (working copy)
@@ -1 +1,2 @@
Mon Jan 28 15:05:10 PST 2019
+testtt
\ No newline at end of file

run python2 and print repr(diff), line ending is "\r\n"
'Index: /TestProject/branches/5.x/relax/Test/test1\r\n===================================================================\r\n--- /TestProject/branches/5.x/relax/Test/test1\t(revision 30075)\r\n+++ /TestProject/branches/5.x/relax/Test/test1\t(working copy)\r\n@@ -1 +1,2 @@\r\n Mon Jan 28 15:05:10 PST 2019\r\n+testtt\r\n\ No newline at end of file\r\n\r\n'

In Linux RBTools 1.0.1, the rbt diff format keep the same as before.

What version of Python and Django?

python 2.7.11

Please provide any additional information below.

The root cause of this issue is the DIFF generated from "rbt diff" has different format.

chipx86
#1 chipx86

Hi,

Can you show me the plain svn diff as well?

  • -New
    +NeedInfo
jackdai
#2 jackdai

C:\test>svn diff
Index: test1
===================================================================
--- test1 (revision 30946)
+++ test1 (working copy)
@@ -1 +1,2 @@
Thu Mar 7 12:41:48 PST 2019
+testtt
\ No newline at end of file

C:\test>