annotate mercurial/templates/map-cmdline.xml @ 32151:4d504e541d3d

rebase: use matcher to optimize manifestmerge The old merge code would call manifestmerge and calculate the complete diff between the source to the destination. In many cases, like rebase, the vast majority of differences between the source and destination are irrelevant because they are differences between the destination and the common ancestor only, and therefore don't affect the merge. Since most actions are 'keep', all the effort to compute them is wasted. Instead, let's compute the difference between the source and the common ancestor and only perform the diff of those files against the merge destination. When using treemanifest, this lets us avoid loading almost the entire tree when rebasing from a very old ancestor. This speeds up rebase of an old stack of 27 commits by 20x. In mozilla-central, without treemanifest, when rebasing a commit from default~100000 to default, this speeds up the manifestmerge step from 2.6s to 1.2s. However, the additional diff adds an overhead to all manifestmerge calls, especially for flat manifests. When rebasing a commit from default~1 to default it appears to add 100ms in mozilla-central. While we could put this optimization behind a flag, I think the fact that it makes merge O(number of changes being applied) instead of O(number of changes between X and Y) justifies it.
author Durham Goode <durham@fb.com>
date Wed, 03 May 2017 10:43:59 -0700
parents 3095b1027661
children f4aeb952ab77
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26222
3095b1027661 templater: add new docheader/footer components for XML (issue4135)
Matt Mackall <mpm@selenic.com>
parents: 13387
diff changeset
1 docheader = '<?xml version="1.0"?>\n<log>\n'
3095b1027661 templater: add new docheader/footer components for XML (issue4135)
Matt Mackall <mpm@selenic.com>
parents: 13387
diff changeset
2 docfooter = '</log>\n'
10153
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
3
13387
0be2fe6a0843 templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents: 10159
diff changeset
4 changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n'
0be2fe6a0843 templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents: 10159
diff changeset
5 changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n'
0be2fe6a0843 templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents: 10159
diff changeset
6 changeset_debug = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}{extras}</logentry>\n'
10153
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
7
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
8 file_add = '<path action="A">{file_add|xmlescape}</path>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
9 file_mod = '<path action="M">{file_mod|xmlescape}</path>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
10 file_del = '<path action="R">{file_del|xmlescape}</path>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
11
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
12 start_file_copies = '<copies>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
13 file_copy = '<copy source="{source|xmlescape}">{name|xmlescape}</copy>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
14 end_file_copies = '</copies>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
15
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
16 parent = '<parent revision="{rev}" node="{node}" />\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
17 branch = '<branch>{branch|xmlescape}</branch>\n'
000546ec7ced Added XML output for hg log
Robert Bachmann <rbachm@gmail.com>
parents:
diff changeset
18 tag = '<tag>{tag|xmlescape}</tag>\n'
13387
0be2fe6a0843 templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents: 10159
diff changeset
19 bookmark = '<bookmark>{bookmark|xmlescape}</bookmark>\n'
10159
182416227722 Added output of "extras" to hg log XML output
Robert Bachmann <rbachm@gmail.com>
parents: 10153
diff changeset
20 extra = '<extra key="{key|xmlescape}">{value|xmlescape}</extra>\n'