annotate mercurial/templates/map-cmdline.status @ 26117:4dc5b51f38fe

revlog: change generaldelta delta parent heuristic The old generaldelta heuristic was "if p1 (or p2) was closer than the last full text, use it, otherwise use prev". This was problematic when a repo contained multiple branches that were very different. If commits to branch A were pushed, and the last full text was branch B, it would generate a fulltext. Then if branch B was pushed, it would generate another fulltext. The problem is that the last fulltext (and delta'ing against `prev` in general) has no correlation with the contents of the incoming revision, and therefore will always have degenerate cases. According to the blame, that algorithm was chosen to minimize the chain length. Since there is already code that protects against that (the delta-vs-fulltext code), and since it has been improved since the original generaldelta algorithm went in (2011), I believe the chain length criteria will still be preserved. The new algorithm always diffs against p1 (or p2 if it's closer), unless the resulting delta will fail the delta-vs-fulltext check, in which case we delta against prev. Some before and after stats on manifest.d size. internal large repo old heuristic - 2.0 GB new heuristic - 1.2 GB mozilla-central old heuristic - 242 MB new heuristic - 261 MB The regression in mozilla central is due to the new heuristic choosing p2r as the delta when it's closer to the tip. Switching the algorithm to always prefer p1r brings the size back down (242 MB). This is result of the way in which mozilla does merges and pushes, and the result could easily swing the other direction in other repos (depending on if they merge X into Y or Y into X), but will never be as degenerate as before. I future patch will address the regression by introducing an optional, even more aggressive delta heuristic which will knock the mozilla manifest size down dramatically.
author Durham Goode <durham@fb.com>
date Sun, 30 Aug 2015 13:58:11 -0700
parents 9c647f427aef
children 2d3837a4bded
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25006
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
1 %include map-cmdline.default
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
2
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
3 # Override base templates
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
4 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}{lfiles}\n'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
5 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{description}{lfiles}\n'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
6 changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{extras}{description}{lfiles}\n'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
7
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
8 # Override the file templates
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
9 lfiles = '{if(files,
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
10 label('ui.note log.files',
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
11 'files:\n'))}{lfile_mods}{lfile_adds}{lfile_copies_switch}{lfile_dels}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
12
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
13 # Exclude copied files, will display those in lfile_copies_switch
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
14 lfile_adds = '{file_adds % "{ifcontains(file, file_copies_switch,
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
15 '',
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
16 '{lfile_add}')}"}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
17 lfile_add = '{label("status.added", "A {file}\n")}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
18
25628
9c647f427aef templates: fix missing closing brace in map-cmdline.status
Yuya Nishihara <yuya@tcha.org>
parents: 25006
diff changeset
19 lfile_copies_switch = '{file_copies_switch % "{lfile_copy_orig}{lfile_copy_dest}"}'
25006
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
20 lfile_copy_orig = '{label("status.added", "A {name}\n")}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
21 lfile_copy_dest = '{label("status.copied", " {source}\n")}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
22
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
23 lfile_mods = '{file_mods % "{label('status.modified', 'M {file}\n')}"}'
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
24
517763f87141 log: add a status template
Jordi Guti?rrez Hermoso <jordigh@octave.org>
parents:
diff changeset
25 lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}'