Commits

Andrew Godwin committed 98a8b4f

Fix svndiff's cheap differ for empty strings.

  • Participants
  • Parent commits 0827940

Comments (0)

Files changed (2)

heechee/__init__.py

- 

heechee/svndiff.py

 def make_cheap_diff(text):
     "Makes a completely uncompressed svndiff of the given text."
     
-    instructions = chr(OP_NEW_DATA << 6) + make_integer(len(text))
+    if text == "":
+        instructions = ""
+    else:
+        instructions = chr(OP_NEW_DATA << 6) + make_integer(len(text))
     
     return ("SVN\0" +
            "\0" + # Source offset