sapling/tests/test-fb-hgext-remotefilelog-blame.t
Xavier Deguillard 309229fdf5 remotefilelog: do no build the entire ancestormap in remotefilectx.parents
Summary:
While working on a stack, I noticed that `hg amend -e` would sometimes download
a lot of history information. For a 4 files change, I saw 738 history entry
fetched individually...

Looking at the profile, this pointed towards remotefilectx.parents requesting
the entire ancestormap. Since that function really only need the nodeinfo,
let's only get that.

Reviewed By: DurhamG

Differential Revision: D17104263

fbshipit-source-id: fae1f673b2d2a641ae4f22d1099317cc5abd8447
2019-08-29 09:51:38 -07:00

33 lines
600 B
Perl

$ setconfig extensions.treemanifest=!
$ . "$TESTDIR/library.sh"
$ hginit master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> server=True
> EOF
$ echo x > x
$ hg commit -qAm x
$ echo y >> x
$ hg commit -qAm y
$ echo z >> x
$ hg commit -qAm z
$ echo a > a
$ hg commit -qAm a
$ cd ..
$ hgcloneshallow ssh://user@dummy/master shallow -q
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
$ cd shallow
Test blame
$ hg blame x
0: x
1: y
2: z
2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over 0.00s