contrib/base-revsets.txt
author Matt Harbison <matt_harbison@yahoo.com>
Sun, 21 Jan 2018 13:54:05 -0500
changeset 35777 0c0689a7565e
parent 25609 67a2192dcb64
child 38712 70a4289896b0
permissions -rw-r--r--
subrepo: handle 'C:' style paths on the command line (issue5770) If you think 'C:' and 'C:\' are equivalent paths, see the inline comment before proceeding. The problem here was that several commands that take a URL argument (incoming, outgoing, pull, and push) will use that value to set 'repo._subtoppath' on the repository object after command specific manipulation of it, but before converting it to an absolute path. When an operation is performed on a relative subrepo, subrepo._abssource() will posixpath.join() this value with the relative subrepo path. That adds a '/' after the drive letter, changing how it is evaluated by abspath()/realpath() in vfsmod.vfs(..., realpath=True) as the subrepo is instantiated. I initially tried sanitizing the path in url.localpath(), because url.isabs() only checks that it starts with a drive letter. By the sample behavior, this is clearly not an absolute path. (Though the comment in isabs() is weasely- this style path can't be joined either.) But not everything funnels through there, and it required explicitly calling localpath() in hg.parseurl() and assigning to url.path to fix. But then tests failed with urls like 'a#0'. Next up was sanitizing the path in the url constructor. That caused doctest failures, because there are drive letter tests, so those got expanded in system specific ways. Yuya correctly pointed out that util.url is a parser, and shouldn't be substituting the path too. Rather than fixing every command call site, just convert it in the common subrepo location. I don't see any sanitizing on the path config options, so I fixed those too. Note that while the behavior is fixed here, there are still places where 'comparing with C:' gets printed out, and that's not great for debugging purposes. (Specifically I saw it in `hg incoming -B C:`, without subrepos.) While clone will write out an absolute default path, I wonder what would happen if a user edited that path to be 'C:'. (I don't think supporting relative paths in .hgrc is a sane thing to do, but while we're poking holes in things...) Since this is such an oddball case, it still leaks through in places, and there seems to be a lot of duplicate url parsing, maybe the url parsing should be moved to dispatch, and provide the command with a url object? Then we could convert this to an absolute path once, and not have to worry about it in the rest of the code. I also checked '--cwd C:' on the command line, and it was previously working because os.chdir() will DTRT. Finally, one other note from the url.localpath() experimenting. I don't see any cases where 'self._hostport' can hold a drive letter. So I'm wondering if that is wrong/old code.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25608
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     1
# Base Revsets to be used with revsetbenchmarks.py script
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     2
#
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     3
# The goal of this file is to gather a limited amount of revsets that allow a
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     4
# good coverage of the internal revsets mechanisms.  Revsets included should not
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     5
# be selected for their individual implementation, but for what they reveal of
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     6
# the internal implementation of smartsets classes (and their interactions).
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     7
#
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     8
# Use and update this file when you change internal implementation of these
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
     9
# smartsets classes. Please include a comment explaining what each of your
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    10
# addition is testing. Also check if your changes to the smartset class makes
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    11
# some of the tests inadequate and replace them with a new one testing the same
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    12
# behavior.
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    13
#
25609
67a2192dcb64 contrib: introduce an all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25608
diff changeset
    14
# If you want to benchmark revsets predicate itself, check 'all-revsets.txt'.
67a2192dcb64 contrib: introduce an all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25608
diff changeset
    15
#
25608
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    16
# The current content of this file is currently likely not reaching this goal
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    17
# entirely, feel free, to audit its content and comment on each revset to
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    18
# highlight what internal mechanisms they test.
2fea23d035d8 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25545
diff changeset
    19
20777
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    20
all()
20744
9907b3f79ac2 contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    21
draft()
20777
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    22
::tip
20744
9907b3f79ac2 contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    23
draft() and ::tip
21285
7078ce067367 revsetbenchmark: add `::tip and draft()` to the canonical list
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21204
diff changeset
    24
::tip and draft()
20777
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    25
0::tip
20744
9907b3f79ac2 contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    26
roots(0::tip)
9907b3f79ac2 contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    27
author(lmoscovicz)
20777
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    28
author(mpm)
20744
9907b3f79ac2 contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    29
author(lmoscovicz) or author(mpm)
21295
883e268cb860 revsetbenchmark: add `author(mpm) or author(lmoscovicz)` to the canonical list
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21285
diff changeset
    30
author(mpm) or author(lmoscovicz)
20777
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    31
tip:0
77318d3c3b24 benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20754
diff changeset
    32
0::
22556
480a24ad9f77 revsetbenchmark: allow comments ('#' prefix) in the revset input
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22458
diff changeset
    33
# those two `roots(...)` inputs are close to what phase movement use.
20894
04e1596d5dbd revset: improve _descendants performance
Durham Goode <durham@fb.com>
parents: 20861
diff changeset
    34
roots((tip~100::) - (tip~100::tip))
22556
480a24ad9f77 revsetbenchmark: allow comments ('#' prefix) in the revset input
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22458
diff changeset
    35
roots((0::) - (0::tip))
24923
e5f166961123 revset: narrow the subset using smartset operation in roots()
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22557
diff changeset
    36
42:68 and roots(42:tip)
20861
c2a81aa19980 revsetbenchmark: add entry for ::rev::
Gregory Szorc <gregory.szorc@gmail.com>
parents: 20777
diff changeset
    37
::p1(p1(tip))::
21204
1d7a2771aa36 revset: inline spanset containment check (fix perf regression)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20894
diff changeset
    38
public()
1d7a2771aa36 revset: inline spanset containment check (fix perf regression)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20894
diff changeset
    39
:10000 and public()
1d7a2771aa36 revset: inline spanset containment check (fix perf regression)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20894
diff changeset
    40
draft()
1d7a2771aa36 revset: inline spanset containment check (fix perf regression)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20894
diff changeset
    41
:10000 and draft()
21939
f486001f9d6f revset: optimize baseset.__sub__ (issue4313)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21546
diff changeset
    42
roots((0:tip)::)
22312
8b980fbbd6dc revsetbenchmark: add revset with lazyset subtraction
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21939
diff changeset
    43
(not public() - obsolete())
22451
186fd06283b4 revset: lower weight for _intlist function
Durham Goode <durham@fb.com>
parents: 22450
diff changeset
    44
(_intlist('20000\x0020001')) and merge()
22450
95af98616aa7 revset: make parents() O(number of parents)
Durham Goode <durham@fb.com>
parents: 22449
diff changeset
    45
parents(20000)
22449
da05fe01170b revset: make descendants() lazier
Durham Goode <durham@fb.com>
parents: 22312
diff changeset
    46
(20000::) - (20000)
22557
ace8320156ef revsetbenchmark: add a rebase-related revset to the benchmark list
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22556
diff changeset
    47
# The one below is used by rebase
ace8320156ef revsetbenchmark: add a rebase-related revset to the benchmark list
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22556
diff changeset
    48
(children(ancestor(tip~5, tip)) and ::(tip~5))::