1. Armin Ronacher
  2. heechee

Commits

Andrew Godwin  committed 98a8b4f

Fix svndiff's cheap differ for empty strings.

  • Participants
  • Parent commits 0827940
  • Branches default

Comments (0)

Files changed (2)

File heechee/__init__.py

View file
  • Ignore whitespace
- 

File heechee/svndiff.py

View file
  • Ignore whitespace
 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