Mercurial > hg
view tests/test-issue1993.t @ 28488:437c32dcec7d
context: use changelogrevision
Upcoming patches will make the changelogrevision object perform
lazy parsing. Let's switch to it.
Because we're switching from a tuple to an object, everthing that
accesses the internal cached attribute needs to be updated to access
via attributes. A nice side-effect is this makes the code easier to
read!
Surprisingly, this appears to make revsets accessing this data
slightly faster (values are before series, p1, this patch):
author(mpm)
0.896565
0.929984
0.914234
desc(bug)
0.887169
0.935642
0.921073
date(2015)
0.878797
0.908094
0.891980
extra(rebase_source)
0.865446
0.922624
0.912514
author(mpm) or author(greg)
1.801832
1.902112
1.860402
author(mpm) or desc(bug)
1.812438
1.860977
1.844850
date(2015) or branch(default)
0.968276
1.005824
0.994673
author(mpm) or desc(bug) or date(2015) or extra(rebase_source)
3.656193
3.743381
3.721032
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Mar 2016 13:26:37 -0800 |
parents | 4591cd6b6794 |
children |
line wrap: on
line source
$ hg init a $ cd a $ echo a > a $ hg ci -Am0 adding a $ echo b > b $ hg ci -Am1 adding b $ hg tag -r0 default warning: tag default conflicts with existing branch name $ hg log changeset: 2:30a83d1e4a1e tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag default for changeset f7b1eb17ad24 changeset: 1:925d80f479bb user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 1 changeset: 0:f7b1eb17ad24 tag: default user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 0 $ hg update 'tag(default)' 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg parents changeset: 0:f7b1eb17ad24 tag: default user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 0 $ hg update 'branch(default)' 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg parents changeset: 2:30a83d1e4a1e tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag default for changeset f7b1eb17ad24 $ cd ..