##// END OF EJS Templates
bisect: avoid adding irrelevant revisions to bisect state...
bisect: avoid adding irrelevant revisions to bisect state When adding new revisions to the bisect state, it only makes sense to add information about revisions that are under consideration (i.e., those that are topologically between the known good and bad revisions). However, if the user passes in a revset (e.g., '!merge()' to exclude merge commits), hg will resolve the revset first and add all matching revisions to the bisect state (which in this case would likely be the majority of revisions in the repo). To avoid this, revisions should only be added to the bisect state if they are between the good and bad revisions (and therefore relevant to the bisection). -- Here are the results of some performance tests using the `mozilla-central` repo (since it is one of the largest freely-available hg repositories in the wild). These tests compare the performance of a locally-built `hg` before and after application of this series. Note that `--noupdate` is passed to avoid including update time (which should not vary across cases). Setup (run between each test): $ hg bisect --reset $ hg bisect --noupdate --bad 56c3ad4bde5c70714b784ccf15d099e0df0f5bde $ hg bisect --noupdate --good 57426696adaf08298af3027fa77486fee0633b13 Test using a revset that returns a very large number of revisions: $ time hg bisect --noupdate --skip '!merge()' > /dev/null Before: real 0m9.398s user 0m9.233s sys 0m0.120s After: real 0m1.513s user 0m1.425s sys 0m0.052s Test using a revset that is expensive to compute: $ time hg bisect --noupdate --skip 'desc("Bug")' > /dev/null Before: real 0m49.853s user 0m49.580s sys 0m0.243s After: real 0m4.120s user 0m4.036s sys 0m0.048s

File last commit:

r49515:7ee07e1a default
r50337:81623652 default
Show More
test-narrow-clone-no-ellipsis.t
166 lines | 3.6 KiB | text/troff | Tads3Lexer
/ tests / test-narrow-clone-no-ellipsis.t
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ . "$TESTDIR/narrow-library.sh"
$ hg init master
$ cd master
$ mkdir dir
$ mkdir dir/src
$ cd dir/src
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done
$ cd ..
$ mkdir tests
$ cd tests
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "t$x"; hg add "t$x"; hg commit -m "Commit test $x"; done
$ cd ../../..
narrow clone a file, f10
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10"
requesting all changes
adding changesets
adding manifests
adding file changes
added 40 changesets with 1 changes to 1 files
new changesets *:* (glob)
$ cd narrow
test: use `hg debugrequires` instead of `cat` in some tests...
r49295 $ hg debugrequires | grep -v generaldelta
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 dotencode
Raphaël Gomès
dirstate-v2: fix confusion between requirement and format config variable...
r49142 dirstate-v2 (dirstate-v2 !)
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 fncache
Augie Fackler
narrowrepo: make repo requirement include the string 'experimental'...
r36106 narrowhg-experimental
persistent-nodemap: enable the feature by default when using Rust...
r47646 persistent-nodemap (rust !)
revlog-compression: use zstd by default (if available)...
r47636 revlog-compression-zstd (zstd !)
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 revlogv1
share-safe: enable by default (BC)...
r49515 share-safe
Boris Feld
test: enable sparse-revlog for test-narrow-clone-no-ellipsis.t...
r40934 sparserevlog
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 store
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 testonly-simplestore (reposimplestore !)
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096
Martin von Zweigbergk
tests: avoid unnecessarily looking inside .hg/ in test-narrow*...
r38873 $ hg tracked
I path:dir/src/f10
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ find * | sort
dir
dir/src
dir/src/f10
$ cat dir/src/f10
10
$ cd ..
narrow clone a directory, tests/, except tests/t19
$ hg clone --narrow ssh://user@dummy/master narrowdir --noupdate --include "dir/tests/" --exclude "dir/tests/t19"
requesting all changes
adding changesets
adding manifests
adding file changes
added 40 changesets with 19 changes to 19 files
new changesets *:* (glob)
$ cd narrowdir
Martin von Zweigbergk
tests: avoid unnecessarily looking inside .hg/ in test-narrow*...
r38873 $ hg tracked
I path:dir/tests
X path:dir/tests/t19
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg update
19 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ find * | sort
dir
dir/tests
dir/tests/t1
dir/tests/t10
dir/tests/t11
dir/tests/t12
dir/tests/t13
dir/tests/t14
dir/tests/t15
dir/tests/t16
dir/tests/t17
dir/tests/t18
dir/tests/t2
dir/tests/t20
dir/tests/t3
dir/tests/t4
dir/tests/t5
dir/tests/t6
dir/tests/t7
dir/tests/t8
dir/tests/t9
$ cd ..
narrow clone everything but a directory (tests/)
$ hg clone --narrow ssh://user@dummy/master narrowroot --noupdate --exclude "dir/tests"
requesting all changes
adding changesets
adding manifests
adding file changes
added 40 changesets with 20 changes to 20 files
new changesets *:* (glob)
$ cd narrowroot
Martin von Zweigbergk
tests: avoid unnecessarily looking inside .hg/ in test-narrow*...
r38873 $ hg tracked
I path:.
X path:dir/tests
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg update
20 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ find * | sort
dir
dir/src
dir/src/f1
dir/src/f10
dir/src/f11
dir/src/f12
dir/src/f13
dir/src/f14
dir/src/f15
dir/src/f16
dir/src/f17
dir/src/f18
dir/src/f19
dir/src/f2
dir/src/f20
dir/src/f3
dir/src/f4
dir/src/f5
dir/src/f6
dir/src/f7
dir/src/f8
dir/src/f9
$ cd ..
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283
Testing the --narrowspec flag to clone
$ cat >> narrowspecs <<EOF
> %include foo
> [include]
> path:dir/tests/
Martin von Zweigbergk
tests: drop extra "file:" prefix from paths in narrow test...
r39578 > path:dir/src/f12
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283 > EOF
$ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
reading narrowspec from '$TESTTMP/narrowspecs'
Martin von Zweigbergk
errors: raise more specifc errors from narrowcommands...
r46733 config error: cannot specify other files using '%include' in narrowspec
[30]
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283
$ cat > narrowspecs <<EOF
> [include]
> path:dir/tests/
Martin von Zweigbergk
tests: drop extra "file:" prefix from paths in narrow test...
r39578 > path:dir/src/f12
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283 > EOF
$ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs
reading narrowspec from '$TESTTMP/narrowspecs'
requesting all changes
adding changesets
adding manifests
adding file changes
Martin von Zweigbergk
tests: drop extra "file:" prefix from paths in narrow test...
r39578 added 40 changesets with 21 changes to 21 files
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283 new changesets 681085829a73:26ce255d5b5d
updating to branch default
Martin von Zweigbergk
tests: drop extra "file:" prefix from paths in narrow test...
r39578 21 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283 $ cd specfile
$ hg tracked
Martin von Zweigbergk
tests: drop extra "file:" prefix from paths in narrow test...
r39578 I path:dir/src/f12
Pulkit Goyal
narrow: add a --narrowspec flag to clone command...
r39283 I path:dir/tests
$ cd ..