comparison tests/test-narrow-clone-non-narrow-server.t @ 40436:30a7d3b6b281

narrow: rework logic to check whether we need to widen and narrow This patch reworks logic which calculates whether we need to extend or narrow our working copy or not. We filter the addincludes, removeincludes, addexcludes and removeexcludes passed from user to the actual added and removed includes and excludes. What that means is a user can pass an already included path as addincludes, a path which is not included as removeincludes etc. In such situations the old logic use to think we need to do some work, whereas we don't need to do that work. In old logic, even if we don't have anything new to include but it believes we need to call widen, this adds some good amount of work on large repository. A widen calls involves computing incomming csets, calling the narrow_widen() which in non-ellipses cases goes through all the set of csets which are available which can take ~2-3 mins on large repos. Those 2-3 minutes are spend on doing nothing which a client can prevent by checking is there really anything which needs to be included. The tests changes shows that we don't go to the server anymore in such cases which is nice. Differential Revision: https://phab.mercurial-scm.org/D5183
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 23 Oct 2018 16:24:04 +0300
parents 06e75fbf9d6b
children e3792741e3fb
comparison
equal deleted inserted replaced
40435:d362a41ee5dd 40436:30a7d3b6b281
56 $ cd narrowclone 56 $ cd narrowclone
57 $ hg tracked --addexclude f2 http://localhost:$HGPORT1/ 57 $ hg tracked --addexclude f2 http://localhost:$HGPORT1/
58 comparing with http://localhost:$HGPORT1/ 58 comparing with http://localhost:$HGPORT1/
59 searching for changes 59 searching for changes
60 looking for local changes to affected paths 60 looking for local changes to affected paths
61
61 $ hg tracked --addinclude f1 http://localhost:$HGPORT1/ 62 $ hg tracked --addinclude f1 http://localhost:$HGPORT1/
63 nothing to widen or narrow
64
65 $ hg tracked --addinclude f9 http://localhost:$HGPORT1/
62 comparing with http://localhost:$HGPORT1/ 66 comparing with http://localhost:$HGPORT1/
63 abort: server does not support narrow clones 67 abort: server does not support narrow clones
64 [255] 68 [255]