Guillermo Pérez <bisho@fb.com> [Thu, 15 Nov 2012 13:57:03 -0800] rev 17944
diff: rewrite diffline
Make diffline more readable, using strings with placeholders
rather than appending to a list from many ifs that makes
difficult to understand the actual output format.
Guillermo Pérez <bisho@fb.com> [Thu, 15 Nov 2012 13:52:51 -0800] rev 17943
diff: swap and simplify diffline args
Args order swapped, since a, b are more important than revs
(which is only used on non-git format), and change to read opts
from context.
Guillermo Pérez <bisho@fb.com> [Thu, 15 Nov 2012 13:49:04 -0800] rev 17942
diff: change how quiet mode supresses diffline
Before, quiet mode produced no diffline header for mercurial as a
side effect of not populating "revs". This was a weird side effect,
and we will always need revs for git index header that will be added
in upcoming patches, so now we just check ui.quiet from diffline
directly.
Guillermo Pérez <bisho@fb.com> [Thu, 15 Nov 2012 12:19:03 -0800] rev 17941
diff: move diffline to patch module
diffline is not part of diff computation, so it makes more sense
to place it with other header generation in patch module.
In upcoming patches we will generalize this approach for
all headers added in the patch, including the git index
header.
Guillermo Pérez <bisho@fb.com> [Thu, 15 Nov 2012 12:16:08 -0800] rev 17940
diff: unify calls to diffline
diffline was called from trydiff for binary diffs and from unidiff
for text diffs. In this patch we unify those calls into one.
diffline is also a header, not part of diff mechanisms, so it makes
sense to remove that responsibility from the mdiff module. In
upcoming patches we will move diffline to patch module and
keep grouping responsibilities.
Guillermo Pérez <bisho at fb.com> [Tue, 06 Nov 2012 14:04:05 -0800] rev 17939
diff: move b85diff to mdiff module
b85diff generates a binary diff, so we move this code to mdiff module
along with unidiff for text diffs. All diffing mechanisms will be in the
same place.
In an upcoming patch we will remove the responsibility to print the
index header from b85diff and move it back to patch, since it's
a patch metadata header, not part of the diff generation.