##// 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:

r46430:21733e8c default
r50337:81623652 default
Show More
test-rebase-mq-skip.t
196 lines | 4.1 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-mq-skip.t
Taapas Agrawal
continue: added support for rebase...
r42832 #testcases continuecommand continueflag
Matt Mackall
check-code: warning and fixes for whitespace in unified tests
r12785 This emulates the effects of an hg pull --rebase in which the remote repo
Adrian Buehlmann
tests: unify test-rebase*
r12608 already has one local mq patch
$ cat >> $HGRCPATH <<EOF
> [extensions]
> rebase=
> mq=
>
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 > [phases]
> publish=False
>
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [alias]
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n"
Adrian Buehlmann
tests: unify test-rebase*
r12608 > EOF
Taapas Agrawal
continue: added support for rebase...
r42832 #if continueflag
$ cat >> $HGRCPATH <<EOF
> [alias]
> continue = rebase --continue
> EOF
#endif
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg init a
$ cd a
$ hg qinit -c
$ echo c1 > c1
$ hg add c1
$ hg ci -m C1
$ echo r1 > r1
$ hg add r1
$ hg ci -m R1
$ hg up -q 0
Mads Kiilerich
tests: stabilise mq rebase tests...
r23515 $ hg qnew p0.patch -d '1 0'
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ echo p0 > p0
$ hg add p0
$ hg qref -m P0
Mads Kiilerich
tests: stabilise mq rebase tests...
r23515 $ hg qnew p1.patch -d '2 0'
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ echo p1 > p1
$ hg add p1
$ hg qref -m P1
Mads Kiilerich
check-code: fix check for trailing whitespace on sh command lines...
r17345 $ hg export qtip > p1.patch
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg up -q -C 1
$ hg import p1.patch
applying p1.patch
$ rm p1.patch
$ hg up -q -C qtip
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 $ hg rebase -v
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:13a46ce44f60 p0.patch qbase "P0"
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 resolving manifests
removing p0
getting r1
resolving manifests
getting p0
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing files:
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 p0
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing manifest
committing changelog
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:148775c71080 p1.patch qtip "P1"
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 resolving manifests
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 note: not rebasing 3:148775c71080 p1.patch qtip "P1", its destination already has all its changes
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 rebase merging completed
updating mq patch p0.patch to 5:9ecc820b1737
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 $TESTTMP/a/.hg/patches/p0.patch
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 2 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
changegroup: skip delta when the underlying revlog do not use them...
r30211 348 (changelog)
Pierre-Yves David
test: explicitly use generaldelta in 'test-rebase-mq-skip.t'...
r26916 324 (manifests)
129 p0
129 p1
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-rebase.hg
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 2 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
changegroup: skip delta when the underlying revlog do not use them...
r30211 403 (changelog)
Pierre-Yves David
test: explicitly use generaldelta in 'test-rebase-mq-skip.t'...
r26916 324 (manifests)
129 p0
129 p1
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 adding branch
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
rebase completed
1 revisions have been skipped
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 3: 9ecc820b1737 'P0' tags: p0.patch qbase qtip tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: 869d8b134a27 'P1' tags: qparent
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: da108f2755df 'R1' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: cd320d50b341 'C1' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
$ hg init b
$ cd b
$ hg qinit -c
$ for i in r0 r1 r2 r3 r4 r5 r6;
> do
> echo $i > $i
> hg ci -Am $i
> done
adding r0
adding r1
adding r2
adding r3
adding r4
adding r5
adding r6
$ hg qimport -r 1:tip
$ hg up -q 0
$ for i in r1 r3 r7 r8;
> do
> echo $i > $i
> hg ci -Am branch2-$i
> done
adding r1
created new head
adding r3
adding r7
adding r8
$ echo somethingelse > r4
$ hg ci -Am branch2-r4
adding r4
$ echo r6 > r6
$ hg ci -Am branch2-r6
adding r6
$ hg up -q qtip
$ HGMERGE=internal:fail hg rebase
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:b4bffa6e4776 qbase r1 "r1"
note: not rebasing 1:b4bffa6e4776 qbase r1 "r1", its destination already has all its changes
rebasing 2:c0fd129beb01 r2 "r2"
rebasing 3:6ff5b8feed8e r3 "r3"
note: not rebasing 3:6ff5b8feed8e r3 "r3", its destination already has all its changes
rebasing 4:094320fec554 r4 "r4"
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ HGMERGE=internal:local hg resolve --all
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
timeless
rebase: hook afterresolvedstates
r27626 continue: hg rebase --continue
Adrian Buehlmann
tests: unify test-rebase*
r12608
Taapas Agrawal
continue: added support for rebase...
r42832 $ hg continue
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 already rebased 1:b4bffa6e4776 qbase r1 "r1" as 057f55ff8f44
already rebased 2:c0fd129beb01 r2 "r2" as 1660ab13ce9a
already rebased 3:6ff5b8feed8e r3 "r3" as 1660ab13ce9a
rebasing 4:094320fec554 r4 "r4"
note: not rebasing 4:094320fec554 r4 "r4", its destination already has all its changes
rebasing 5:681a378595ba r5 "r5"
rebasing 6:512a1f24768b qtip r6 "r6"
note: not rebasing 6:512a1f24768b qtip r6 "r6", its destination already has all its changes
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 8: 0b9735ce8f0a 'r5' tags: qtip r5 tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 7: 1660ab13ce9a 'r2' tags: qbase r2
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 6: 057f55ff8f44 'branch2-r6' tags: qparent
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: 1d7287f8deb1 'branch2-r4' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 3c10b9db2bd5 'branch2-r8' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 3: b684023158dc 'branch2-r7' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: d817754b1251 'branch2-r3' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: 0621a206f8a4 'branch2-r1' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 222799e2f90b 'r0' tags:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..