mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
b44571c5bc
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
39 lines
682 B
Perl
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
|
|
|