mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
0ed26e5739
Function patch.diffhunks yields items for a "block" (i.e. a file) as a whole so take advantage of this to simplify the algorithm and avoid parsing diff lines to determine whether we're starting a new "block" or not. Thus we drop to external block counter and rely on diffhunks iterations instead. We also take advantage of the fact that patch.diffhunks() yields *lines* of hunks (instead of a string) to avoid building a list that is ''.join-ed into a string that is then split. As lines in 'header' returned by patch.diffhunks() have no trailing new line, we need to insert it ourselves to match template expectations. |
||
---|---|---|
.. | ||
__init__.py | ||
common.py | ||
hgweb_mod.py | ||
hgwebdir_mod.py | ||
protocol.py | ||
request.py | ||
server.py | ||
webcommands.py | ||
webutil.py | ||
wsgicgi.py |