Wed, 17 Jun 2015 19:19:57 -0700 revset: refactor the non-public phase code
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Jun 2015 19:19:57 -0700] rev 25621
revset: refactor the non-public phase code Code for draft and secret are the same. We'll make it more complex to take advantages of the set recomputed in C, so we first refactor the code to only have one place to update (and make sure all behave properly). We do not refactor the 'public()' code because it does not have a natively computed set.
Tue, 16 Jun 2015 19:47:46 -0700 revset: translate node directly with changelog in 'head'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 19:47:46 -0700] rev 25620
revset: translate node directly with changelog in 'head' Using 'repo[X]' is much slower because it creates a 'changectx' object and goes though multiple layers of code to do so. It is also error prone if there is tags, bookmarks, branch or other names that could map to a node hash and take precedence (user are wicked). This provides a significant performance boost on repository with a lot of heads. Benchmark result for a repo with 1181 heads. revset: head() plain min last reverse 0) 0.014853 0.014371 0.014350 0.015161 1) 0.001402 9% 0.000975 6% 0.000874 6% 0.001415 9% revset: head() - public() plain min last reverse 0) 0.015121 0.014420 0.014560 0.015028 1) 0.001674 11% 0.001109 7% 0.000980 6% 0.001693 11% revset: draft() and head() plain min last reverse 0) 0.015976 0.014490 0.014214 0.015892 1) 0.002335 14% 0.001018 7% 0.000887 6% 0.002340 14% The speed up is visible even when other more costly revset are in use revset: head() and author("mpm") plain min last reverse 0) 0.105419 0.090046 0.017169 0.108180 1) 0.090721 86% 0.077602 86% 0.003556 20% 0.093324 86%
Wed, 10 Jun 2015 19:58:27 -0700 revset: use a baseset in _notpublic()
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Jun 2015 19:58:27 -0700] rev 25619
revset: use a baseset in _notpublic() The '_notpublic()' internal revset was "returning" a set. That was wrong. We now return a 'baseset' as appropriate. This has no effect on performance in most case, because we do the exact same operation than what the combination with a 'fullreposet' was doing. This as a small effect on some operation when combined with other set, because we now apply the filtering in all cases. I think the correctness is worth the impact on some corner cases. The optimizer should take care of these corner cases anyway. revset #0: not public() plain min max first last reverse 0) 0.000465 0.000491 0.000495 0.000500 0.000494 0.000479 1) 0.000484 0.000503 0.000498 0.000505 0.000504 0.000491 revset #1: (tip~1000::) - public() plain min max first last reverse 0) 0.002765 0.001742 0.002767 0.001730 0.002761 0.002782 1) 0.002847 0.001777 0.002776 0.001741 0.002764 0.002858 revset #2: not public() and branch("default") plain min max first last reverse 0) 0.012104 0.011138 0.011189 0.011138 0.011166 0.011578 1) 0.011387 94% 0.011738 105% 0.014220 127% 0.011223 0.011184 0.012077 revset #3: (not public() - obsolete()) plain min max first last reverse 0) 0.000583 0.000556 0.000552 0.000555 0.000552 0.000610 1) 0.000613 105% 0.000559 0.000557 0.000573 0.000558 0.000613 revset #4: head() - public() plain min max first last reverse 0) 0.010869 0.010800 0.011547 0.010843 0.010891 0.010891 1) 0.011031 0.011497 106% 0.011087 0.011100 0.011100 0.011085
Wed, 17 Jun 2015 16:29:46 -0700 contrib: clean up all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Jun 2015 16:29:46 -0700] rev 25618
contrib: clean up all-revsets.txt file I forgot to cleanup a handful of them when I originally created the file.
Thu, 18 Jun 2015 17:06:18 +0800 hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jun 2015 17:06:18 +0800] rev 25617
hgweb: link to revision by node hash in paper & coal Unlike other styles, paper and coal had only one link to current revision: in the sidebar. Since those links now use symbolic revisions after 3bb6f5f478a7, it's nice to have a link that allows going from /rev/tip to /rev/<tip hash>, for instance. Let's make the node hash in the page header that new link.
Thu, 18 Jun 2015 16:14:10 +0800 hgweb: link to revision by node hash in gitweb & monoblue
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jun 2015 16:14:10 +0800] rev 25616
hgweb: link to revision by node hash in gitweb & monoblue This allows going from /rev/tip to /rev/<tip hash> with ease.
Tue, 16 Jun 2015 23:14:45 -0400 archive: report the node as "{p1node}+" when archiving a dirty wdir()
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:14:45 -0400] rev 25615
archive: report the node as "{p1node}+" when archiving a dirty wdir() This is more useful than reporting all 'f's, allowing the archive to be diffed against a specific revision to see what changed.
Mon, 15 Jun 2015 16:06:17 -0700 phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:06:17 -0700] rev 25614
phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace I find this idiom fairly horrible.
Mon, 15 Jun 2015 16:06:24 -0700 phase: document the replace method
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:06:24 -0700] rev 25613
phase: document the replace method This is a minor documentation update to answer a co-worker question.
Mon, 15 Jun 2015 16:16:02 -0700 revset: ensure we have loaded phases data in '_notpublic()'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:16:02 -0700] rev 25612
revset: ensure we have loaded phases data in '_notpublic()' If we are the very first rev access (or if the phase cache just got invalidated) the phasesets will be None even if we support the native computation. So we explicitly trigger a computation if needed. This was not an issue before because requesting any phase information would have triggered such computation.
Mon, 15 Jun 2015 16:04:14 -0700 phase: rename getphaserevs to loadphaserevs
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:04:14 -0700] rev 25611
phase: rename getphaserevs to loadphaserevs This function is: - already loading the data in place, - used once in the code. So we drop the return value and change the name to make this obvious. We keep the function public because we'll have to use it in revset.
Wed, 17 Jun 2015 16:45:25 -0400 test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com> [Wed, 17 Jun 2015 16:45:25 -0400] rev 25610
test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10 The output on 10.10 looks like this: Length Date Time Name -------- ---- ---- ---- 172 01-01-80 00:00 .hg_archival.txt 10 01-01-80 00:00 .hgsub 45 01-01-80 00:00 .hgsubstate 3 01-01-80 00:00 x.txt 10 01-01-80 00:00 foo/.hgsub 45 01-01-80 00:00 foo/.hgsubstate 9 01-01-80 00:00 foo/y.txt 9 01-01-80 00:00 foo/bar/z.txt -------- ------- 303 8 files (2 digit year, shorter -- separators and closer columns). We don't care about any of that, so ignore it.
Tue, 16 Jun 2015 22:15:30 -0700 contrib: introduce an all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 22:15:30 -0700] rev 25609
contrib: introduce an all-revsets.txt file This file should gather all revsets ever thought interesting by anyone. That way one can check the impact of a change when touching something revset-ish. See inline comments for details. This file have been refilled with all the entry I could automatically find from changeset descriptions. I assume we missed some not using 'revsetbenchmarks.py' output.
Tue, 16 Jun 2015 20:36:00 -0700 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 20:36:00 -0700] rev 25608
contrib: rename revsetbenchmarks.txt to 'base-revsets.txt' We rename the file and document its purpose. We'll be introducing another file gathering revsets useful for benchmark of the predicate themsleves in a coming changesets.
Tue, 16 Jun 2015 20:24:37 -0700 revsetbenchmarks: add main documention for the script
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 20:24:37 -0700] rev 25607
revsetbenchmarks: add main documention for the script This allow us to document the fact we can use comment in the file listing revsets.
Tue, 16 Jun 2015 16:07:39 +0800 hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 16:07:39 +0800] rev 25606
hgweb: don't dereference symbolic revision in paper & coal style (issue2296) Let's make paper (and coal, since it borrows so much from paper) templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 14:37:53 +0800 hgweb: don't dereference symbolic revision in gitweb style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 14:37:53 +0800] rev 25605
hgweb: don't dereference symbolic revision in gitweb style Let's make gitweb templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 13:59:49 +0800 hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 13:59:49 +0800] rev 25604
hgweb: don't dereference symbolic revision in monoblue style Let's make monoblue templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 11:52:10 +0800 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 11:52:10 +0800] rev 25603
hgweb: don't dereference symbolic revision in spartan style Let's make spartan templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes, and many pages also have permanent link to current node hash (i.e. you can go from /rev/tip to /rev/<tip hash> without manual url editing), so it's safe to update navigation.
Tue, 16 Jun 2015 02:07:25 +0800 hgweb: provide symrev (symbolic revision) property to the templates
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 02:07:25 +0800] rev 25602
hgweb: provide symrev (symbolic revision) property to the templates One of the features of hgweb is that current position in repo history is remembered between separate requests. That is, links from /rev/<node_hash> lead to /file/<node_hash> or /log/<node_hash>, so it's easy to dig deep into the history. However, such links could only use node hashes and local revision numbers, so while staying at one exact revision is easy, staying on top of the changes is not, because hashes presumably can't change (local revision numbers can, but probably not in a way you'd find useful for navigating). So while you could use 'tip' or 'default' in a url, links on that page would be permanent. This is not always desired (think /rev/tip or /graph/stable or /log/@) and is sometimes just confusing (i.e. /log/<not the tip hash>, when recent history is not displayed). And if user changed url deliberately to say default instead of <some node hash>, the page ignores that fact and uses node hash in its links, which means that navigation is, in a way, broken. This new property, symrev, is used for storing current revision the way it was specified, so then templates can use it in links and thus "not dereference" the symbolic revision. It is an additional way to produce links, so not every link needs to drop {node|short} in favor of {symrev}, many will still use node hash (log and filelog entries, annotate lines, etc). Some pages (e.g. summary, tags) always use the tip changeset for their context, in such cases symrev is set to 'tip'. This is needed in case the pages want to provide archive links. highlight extension needs to be updated, since _filerevision now takes an additional positional argument (signature "web, req, tmpl" is used by most of webcommands.py functions). More references to symbolic revisions and related gripes: issue2296, issue2826, issue3594, issue3634.
Tue, 16 Jun 2015 23:06:57 -0400 archive: support 'wdir()'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:06:57 -0400] rev 25601
archive: support 'wdir()' This is a step toward replacing the extdiff internals with archive, in order to support 'extdiff -S'. Only Mercurial subrepos are supported for now. If a file is missing from the filesystem, it is silently skipped. Perhaps it should warn, but it cannot abort when working with extdiff because deleting a file is a legitimate diff.
Tue, 16 Jun 2015 23:03:36 -0400 subrepo: allow a representation of the working directory subrepo
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:03:36 -0400] rev 25600
subrepo: allow a representation of the working directory subrepo Some code cannot handle a subrepo based on the working directory (e.g. sub.dirty()), so the caller must opt in. This will be useful for archive, and perhaps some other commands. The git and svn methods where this is used may need to be fixed up on a case by case basis.
Tue, 16 Jun 2015 22:13:19 +0900 templater: comment that gettemplate() has different name resolution order
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Jun 2015 22:13:19 +0900] rev 25599
templater: comment that gettemplate() has different name resolution order I've tried to unify gettemplate() with buildtemplate(), but it didn't go well because gettemplate() have to bypass mapping dict. For example, web templates have '{tags%changelogtag}' and 'changelogtag' is defined in both mapping, the default, and context.cache, sourced from map file. In general, mapping shadows context variables, but gettemplate() have to pick it from context.cache.
Sat, 13 Jun 2015 20:23:52 +0900 templater: drop strtoken argument from compiletemplate()
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 20:23:52 +0900] rev 25598
templater: drop strtoken argument from compiletemplate() There's no "rawstring" template now.
Wed, 10 Jun 2015 21:44:43 +0900 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org> [Wed, 10 Jun 2015 21:44:43 +0900] rev 25597
templater: do not reevaluate rawstring as template (BC) The previous patch made 'string' is always interpreted as a template. So this patch removes the special handling of r'rawstring' instead. Now r'' disables template processing at all.
Sat, 13 Jun 2015 19:49:54 +0900 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 19:49:54 +0900] rev 25596
templater: take any string literals as template, but not for rawstring (BC) This patch series is intended to unify the interpretation of string literals. It is breaking change that boldly assumes a. string literal "..." never contains template-like fragment or it is intended to be a template b. we tend to use raw string literal r"..." for regexp pattern in which "{" should have different meaning Currently, we don't have a comprehensible rule how string literals are evaluated in template functions. For example, fill() takes "initialindent" and "hangindent" as templates, but not for "text", whereas "text" is a template in pad() function. date(date, fmt) diff(includepattern, excludepattern) fill(text, width, initialident: T, hangindent: T) get(dict, key) if(expr, then: T, else: T) ifcontains(search, thing, then: T, else: T) ifeq(expr1, expr2, then: T, else: T) indent(text, indentchars, firstline) join(list, sep) label(label: T, expr: T) pad(text: T, width, fillchar, right) revset(query, formatargs...]) rstdoc(text, style) shortest(node, minlength) startswith(pattern, text) strip(text, chars) sub(pattern, replacement, expression: T) word(number, text, separator) expr % template: T T: interpret "string" or r"rawstring" as template This patch series adjusts the rule as follows: a. string literal, '' or "", starts template processing (BC) b. raw string literal, r'' or r"", disables both \-escape and template processing (BC, done by subsequent patches) c. fragment not surrounded by {} is non-templated string "ccc{'aaa'}{r'bbb'}" ------------------ *: template --- c: string --- a: template --- b: rawstring Because this can eliminate the compilation of template arguments from the evaluation phase, "hg log -Tdefault" gets faster. % cd mozilla-central % LANG=C HGRCPATH=/dev/null hg log -Tdefault -r0:10000 --time > /dev/null before: real 4.870 secs (user 4.860+0.000 sys 0.010+0.000) after: real 3.480 secs (user 3.440+0.000 sys 0.030+0.000) Also, this will allow us to parse nested templates at once for better error indication.
Sat, 13 Jun 2015 00:15:22 +0900 templater: move runtemplate function out of buildmap/runmap pair
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 00:15:22 +0900] rev 25595
templater: move runtemplate function out of buildmap/runmap pair The next patch will introduce buildtemplate function that should be defined near runtemplate. But I don't want to insert it between buildmap and runmap.
Mon, 15 Jun 2015 16:08:22 -0700 phase: also overwrite phase's sets when replacing a phasecache
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:08:22 -0700] rev 25594
phase: also overwrite phase's sets when replacing a phasecache We need to copy this new attributes around too. This fix an issue where phases data used by 'not public()' were not invalidated properly.
Mon, 15 Jun 2015 15:57:47 -0700 phase: invalidate the phase's set cache alongside the revs
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 15:57:47 -0700] rev 25593
phase: invalidate the phase's set cache alongside the revs Invalidate was leaving set data around leading to possible bugs in revset.
Mon, 15 Jun 2015 15:52:52 -0700 phase: also copy phase's sets when copying phase cache
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 15:52:52 -0700] rev 25592
phase: also copy phase's sets when copying phase cache We forgot to add such copy when we added the attributes.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip