Mercurial > hg
view tests/test-unrelated-pull.t @ 26206:ab1c6e4efda4
add: pass full=False to dirstate walk
Previously cmdutil.add would call wctx.walk(), which under the hood calls
dirstate.walk with full=True. This means it returns all of the clean files
(which we don't need when computing the add set), as well as the unclean files.
This results in 1) a lot more work being done and 2) this code path
circumventing the hgwatchman extension, resulting in worse performance in
hgwatchman environments ('hg add .' went from 9s to 1.8s).
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 09 Sep 2015 09:07:27 -0700 |
parents | f2719b387380 |
children | eb586ed5d8ce |
line wrap: on
line source
$ hg init a $ cd a $ echo 123 > a $ hg add a $ hg commit -m "a" -u a $ cd .. $ hg init b $ cd b $ echo 321 > b $ hg add b $ hg commit -m "b" -u b $ hg pull ../a pulling from ../a searching for changes abort: repository is unrelated [255] $ hg pull -f ../a pulling from ../a searching for changes warning: repository is unrelated requesting all changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) $ hg heads changeset: 1:9a79c33a9db3 tag: tip parent: -1:000000000000 user: a date: Thu Jan 01 00:00:00 1970 +0000 summary: a changeset: 0:01f8062b2de5 user: b date: Thu Jan 01 00:00:00 1970 +0000 summary: b $ cd ..