sapling/tests/test-fb-hgext-treedirstate-completion.t
Mark Thomas b44571c5bc treedirstate: implement fast debugpathcomplete with treedirstate
Summary:
`hg debugpathcomplete` is another example where the current implementation
iterates the whole dirstate looking for information that's in one directory.

With treedirstate, this can be made faster by using the tree structure.

Differential Revision: D7024784

fbshipit-source-id: 3c0b403887e85157b7eb2752abce5a0805e6ed1c
2018-04-13 21:51:14 -07:00

39 lines
682 B
Perl

$ cat >> $HGRCPATH <<EOF
> [extensions]
> treedirstate=
> [treedirstate]
> useinnewrepos=True
> EOF
$ hg init repo
$ cd repo
$ echo file1 > file1
$ echo file2 > file2
$ mkdir -p dira dirb
$ echo file3 > dira/file3
$ echo file4 > dirb/file4
$ echo file5 > dirb/file5
$ hg ci -q -Am base
Test debugpathcomplete with just normal files
$ hg debugpathcomplete f
file1
file2
$ hg debugpathcomplete -f d
dira/file3
dirb/file4
dirb/file5
Test debugpathcomplete with removed files
$ hg rm dirb/file5
$ hg debugpathcomplete -r d
dirb
$ hg debugpathcomplete -fr d
dirb/file5
$ hg rm dirb/file4
$ hg debugpathcomplete -n d
dira