Building up the delta parser
Get series with b4
b4 am 20101013091714.GA32608@burratinoVersions newest first
- v1 Latest11 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | fixup! vcs-svn: Learn to parse variable-length integersvcs-svn/ | +2 | 0 replies | |
| 2/11 | vcs-svn: Skeleton of an svn delta parserMakefile t/ test-svn-fe.c +2 more | +189 | 0 replies | |
| 3/11 | vcs-svn: Read the preimage while applying deltast/ vcs-svn/ | +53 | 2 replies | |
| 4/11 | vcs-svn: Read inline data from deltast/ vcs-svn/ | +36 | 0 replies | |
| 5/11 | vcs-svn: Read instructions from deltast/ vcs-svn/ | +23 | 0 replies | |
| 6/11 | vcs-svn: Implement copyfrom_data delta instructiont/ vcs-svn/ | +112 | 0 replies | |
| 7/11 | vcs-svn: Check declared number of output bytesvcs-svn/ | +5 | 0 replies | |
| 8/11 | vcs-svn: Reject deltas that do not consume all inline datat/ vcs-svn/ | +5 | 0 replies | |
| 9/11 | vcs-svn: Let deltas use data from postimaget/ vcs-svn/ | +70 | 0 replies | |
| 10/11 | vcs-svn: Reject deltas that read past end of preimaget/ vcs-svn/ | +10 | 0 replies | |
| 11/11 | vcs-svn: Allow deltas to copy from preimaget/ vcs-svn/ | +58 | 0 replies | |
| 11/11 | vcs-svn: Allow deltas to copy from preimaget/ vcs-svn/ | +58 | 0 replies |
Reviews trailers per patch
None of the 12 patches has a Reviewed-by or Acked-by.
| Patch | Ramkumar Ramachandra | David Barr |
|---|---|---|
| 1/11 | ||
| 2/11 | Helped-by | Helped-by |
| 3/11 | Helped-by | Helped-by |
| 4/11 | Helped-by | Helped-by |
| 5/11 | ||
| 6/11 | ||
| 7/11 | ||
| 8/11 | ||
| 9/11 | ||
| 10/11 | Helped-by | Helped-by |
| 11/11 | Helped-by Helped-by | Helped-by Helped-by |
| 11/11 | Helped-by Helped-by | Helped-by Helped-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH/RFC 0/11] Building up the delta parser
Quoted 1 line · Jonathan Nieder
Implement an svndiff 0 interpreter
I hear that was nigh unreadable, so here's a reroll. Less cargo-cult support for broken deltas, more readability and tests. Patches apply on top of "[PATCH 15/16] t9010 (svn-fe): Eliminate dependency on svn perl bindings". As before, the end result includes a 'test-svn-fe -d' command that can apply svndiff0-format deltas, meaning less binary garbage to worry about as you puzzle over that confusing "svnrdump dump" output in debugging sessions.
Questions? Improvements? Bugs?
Patch 1 is a fixup to the variable-length integer parsing code, to report unexpected EOF (i.e., declared content length too long) correctly when it occurs in the middle of such an integer.
Patch 2 is the svndiff0 interpreter in broad strokes: read window, read window, read window, .... The patch doesn't encode any knowledge about what actually goes _in_ a window aside from the header, so it will error out for nonempty windows.
Patch 3 teaches the nacent interpreter to keep the appropriate piece of the preimage in memory. This is probably earlier in the series than it ought to be, but I wanted to try out the sliding window code.
With patches 4 and 5, the interpreter learns to read the "data" and "instructions" section of a window. The effect is observable because it finds the beginning of the next window correctly.
Patch 6 is an example instruction (copyfrom_data).
Patches 7-8 introduce some sanity checks.
Patches 9 and 10 are another instruction (copyfrom_target) and another sanity check.
Patch 11 is the last instruction (copyfrom_source). That's it. You can apply deltas now!
If anything seems unclear, please don't spend time puzzling it out --- just yell at me, so the code or documentation can be cleaned up. Happy reading.