Skip to content
Snippets Groups Projects
Commit a5a06c9c authored by Mike Edgar's avatar Mike Edgar
Browse files

mdiff: add helper for making deltas which replace the full text of a revision

This helper will be used initially for censor-aware delta generation. Deltas
which replace the full contents of the base revision are guaranteed to apply
correctly regardless of whether the delta recipient has censored the base.

For background and broader design of the censorship feature, see:
http://mercurial.selenic.com/wiki/CensorPlan
parent 76f6ae06
No related branches found
No related tags found
No related merge requests found
......@@ -367,6 +367,9 @@
def trivialdiffheader(length):
return struct.pack(">lll", 0, 0, length)
def replacediffheader(oldlen, newlen):
return struct.pack(">lll", 0, oldlen, newlen)
patches = mpatch.patches
patchedsize = mpatch.patchedsize
textdiff = bdiff.bdiff
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment