##// END OF EJS Templates
perf: add command for measuring revlog chunk operations...
perf: add command for measuring revlog chunk operations Upcoming commits will teach revlogs to leverage the new compression engine API so that new compression formats can more easily be leveraged in revlogs. We want to be sure this refactoring doesn't regress performance. So this commit introduces "perfrevchunks" to explicitly test performance of reading, decompressing, and recompressing revlog chunks. Here is output when run on the mozilla-unified repo: $ hg perfrevlogchunks -c ! read ! wall 0.346603 comb 0.350000 user 0.340000 sys 0.010000 (best of 28) ! read w/ reused fd ! wall 0.337707 comb 0.340000 user 0.320000 sys 0.020000 (best of 30) ! read batch ! wall 0.013206 comb 0.020000 user 0.000000 sys 0.020000 (best of 221) ! read batch w/ reused fd ! wall 0.013259 comb 0.030000 user 0.010000 sys 0.020000 (best of 222) ! chunk ! wall 1.909939 comb 1.910000 user 1.900000 sys 0.010000 (best of 6) ! chunk batch ! wall 1.750677 comb 1.760000 user 1.740000 sys 0.020000 (best of 6) ! compress ! wall 5.668004 comb 5.670000 user 5.670000 sys 0.000000 (best of 3) $ hg perfrevlogchunks -m ! read ! wall 0.365834 comb 0.370000 user 0.350000 sys 0.020000 (best of 26) ! read w/ reused fd ! wall 0.350160 comb 0.350000 user 0.320000 sys 0.030000 (best of 28) ! read batch ! wall 0.024777 comb 0.020000 user 0.000000 sys 0.020000 (best of 119) ! read batch w/ reused fd ! wall 0.024895 comb 0.030000 user 0.000000 sys 0.030000 (best of 118) ! chunk ! wall 2.514061 comb 2.520000 user 2.480000 sys 0.040000 (best of 4) ! chunk batch ! wall 2.380788 comb 2.380000 user 2.360000 sys 0.020000 (best of 5) ! compress ! wall 9.815297 comb 9.820000 user 9.820000 sys 0.000000 (best of 3) We already see some interesting data, such as how much slower non-batched chunk reading is and that zlib compression appears to be >2x slower than decompression. I didn't have the data when I wrote this commit message, but I ran this on Mozilla's NFS-based Mercurial server and the time for reading with a reused file descriptor was faster. So I think it is worth testing both with and without file descriptor reuse so we can make informed decisions about recycling file descriptors.

File last commit:

r28500:2e1bceee default
r30451:94ca0e13 default
Show More
test-bookmarks-current.t
224 lines | 5.0 KiB | text/troff | Tads3Lexer
/ tests / test-bookmarks-current.t
Martin Geisler
tests: unify test-bookmarks-current
r11862 $ hg init
no bookmarks
$ hg bookmarks
no bookmarks set
set bookmark X
$ hg bookmark X
list bookmarks
$ hg bookmark
* X -1:000000000000
list bookmarks with color
$ hg --config extensions.color= --config color.mode=ansi \
> bookmark --color=always
Yuya Nishihara
bookmarks: split ui.write() so that it can be easily ported to formatter api...
r22775 \x1b[0;32m * \x1b[0m\x1b[0;32mX\x1b[0m\x1b[0;32m -1:000000000000\x1b[0m (esc)
Martin Geisler
tests: unify test-bookmarks-current
r11862
update to bookmark X
FUJIWARA Katsunori
update: omit redundant activating message for already active bookmark...
r28500 $ hg bookmarks
* X -1:000000000000
Martin Geisler
tests: unify test-bookmarks-current
r11862 $ hg update X
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
list bookmarks
$ hg bookmarks
* X -1:000000000000
rename
$ hg bookmark -m X Z
list bookmarks
Benoit Boissinot
bookmarks: fix update of the current bookmark during rename...
r13620 $ cat .hg/bookmarks.current
Z (no-eol)
$ cat .hg/bookmarks
0000000000000000000000000000000000000000 Z
Martin Geisler
tests: unify test-bookmarks-current
r11862 $ hg bookmarks
* Z -1:000000000000
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 new bookmarks X and Y, first one made active
Martin Geisler
tests: unify test-bookmarks-current
r11862
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 $ hg bookmark Y X
Martin Geisler
tests: unify test-bookmarks-current
r11862
list bookmarks
$ hg bookmark
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 X -1:000000000000
Martin Geisler
tests: unify test-bookmarks-current
r11862 * Y -1:000000000000
Z -1:000000000000
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 $ hg bookmark -d X
Martin Geisler
tests: unify test-bookmarks-current
r11862 commit
$ echo 'b' > b
$ hg add b
$ hg commit -m'test'
list bookmarks
$ hg bookmark
* Y 0:719295282060
Z -1:000000000000
Ryan McElroy
commands: rename current to active in variables and comments...
r25349 Verify that switching to Z updates the active bookmark:
Augie Fackler
bookmarks: verify switching bookmarks works properly
r13433 $ hg update Z
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Stephen Lee
update: show message when a bookmark is activated by update...
r21503 (activating bookmark Z)
Augie Fackler
bookmarks: verify switching bookmarks works properly
r13433 $ hg bookmark
Y 0:719295282060
* Z -1:000000000000
Switch back to Y for the remaining tests in this file:
$ hg update Y
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Stephen Lee
update: show message when a bookmark is activated by update...
r21503 (activating bookmark Y)
Augie Fackler
bookmarks: verify switching bookmarks works properly
r13433
Martin Geisler
tests: unify test-bookmarks-current
r11862 delete bookmarks
$ hg bookmark -d Y
$ hg bookmark -d Z
list bookmarks
$ hg bookmark
no bookmarks set
update to tip
$ hg update tip
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 set bookmark Y using -r . but make sure that the active
bookmark is not activated
Martin Geisler
tests: unify test-bookmarks-current
r11862
$ hg bookmark -r . Y
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 list bookmarks, Y should not be active
Martin Geisler
tests: unify test-bookmarks-current
r11862
$ hg bookmark
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 Y 0:719295282060
now, activate Y
$ hg up -q Y
Kevin Bullock
bookmarks: allow to create/move bookmark without making it current (issue2788)...
r14188
set bookmark Z using -i
$ hg bookmark -r . -i Z
$ hg bookmarks
* Y 0:719295282060
Z 0:719295282060
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189
Ryan McElroy
commands: rename current to active in variables and comments...
r25349 deactivate active bookmark using -i
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189
$ hg bookmark -i Y
$ hg bookmarks
Y 0:719295282060
Z 0:719295282060
$ hg up -q Y
Kevin Bullock
bookmarks: deactivate current bookmark if no name is given...
r17735 $ hg bookmark -i
$ hg bookmarks
Y 0:719295282060
Z 0:719295282060
$ hg bookmark -i
no active bookmark
$ hg up -q Y
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189 $ hg bookmarks
* Y 0:719295282060
Z 0:719295282060
Ryan McElroy
commands: rename current to active in variables and comments...
r25349 deactivate active bookmark while renaming
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189
$ hg bookmark -i -m Y X
$ hg bookmarks
X 0:719295282060
Z 0:719295282060
Idan Kamara
update: delete bookmarks.current when explicitly updating to a rev (issue3276)
r16191
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 bare update moves the active bookmark forward and clear the divergent bookmarks
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742
$ echo a > a
$ hg ci -Am1
adding a
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 $ echo b >> a
$ hg ci -Am2
$ hg bookmark X@1 -r 1
$ hg bookmark X@2 -r 2
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 $ hg update X
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Stephen Lee
update: show message when a bookmark is activated by update...
r21503 (activating bookmark X)
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 $ hg bookmarks
* X 0:719295282060
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 X@1 1:cc586d725fbe
X@2 2:49e1c4e84c58
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 Z 0:719295282060
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating bookmark X
$ hg bookmarks
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 * X 2:49e1c4e84c58
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 Z 0:719295282060
Idan Kamara
update: delete bookmarks.current when explicitly updating to a rev (issue3276)
r16191 test deleting .hg/bookmarks.current when explicitly updating
to a revision
$ echo a >> b
$ hg ci -m.
$ hg up -q X
$ test -f .hg/bookmarks.current
try to update to it again to make sure we don't
set and then unset it
$ hg up -q X
$ test -f .hg/bookmarks.current
$ hg up -q 1
$ test -f .hg/bookmarks.current
[1]
when a bookmark is active, hg up -r . is
Mads Kiilerich
spelling: fixes from spell checker
r21024 analogous to hg book -i <active bookmark>
Idan Kamara
update: delete bookmarks.current when explicitly updating to a rev (issue3276)
r16191
$ hg up -q X
$ hg up -q .
$ test -f .hg/bookmarks.current
[1]
Ryan McElroy
templatekw: display active bookmark more consistently (issue4552) (BC)...
r25387
issue 4552 -- simulate a pull moving the active bookmark
$ hg up -q X
$ printf "Z" > .hg/bookmarks.current
$ hg log -T '{activebookmark}\n' -r Z
Z
$ hg log -T '{bookmarks % "{active}\n"}' -r Z
Z
FUJIWARA Katsunori
destutil: choose non-closed branch head at first (BC)...
r28385
test that updating to closed branch head also advances active bookmark
$ hg commit --close-branch -m "closed"
$ hg update -q ".^1"
$ hg bookmark Y
$ hg bookmarks
X 3:4d6bd4bfb1ae
* Y 3:4d6bd4bfb1ae
Z 0:719295282060
$ hg update
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating bookmark Y
$ hg bookmarks
X 3:4d6bd4bfb1ae
* Y 4:8fa964221e8e
Z 0:719295282060
$ hg parents -q
4:8fa964221e8e