##// END OF EJS Templates
narrow: widen when files are excluded by sparse and not included by narrow...
Charles Chamberlain -
r48083:f2e346c3 default draft
parent child Browse files
Show More
@@ -346,6 +346,9 b' def updateworkingcopy(repo, assumeclean='
346 ds.drop(f)
346 ds.drop(f)
347
347
348 pctx = repo[b'.']
348 pctx = repo[b'.']
349
350 # only update added files that are in the sparse checkout
351 addedmatch = matchmod.intersectmatchers(addedmatch, sparse.matcher(repo))
349 newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds]
352 newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds]
350 for f in newfiles:
353 for f in newfiles:
351 ds.normallookup(f)
354 ds.normallookup(f)
@@ -70,3 +70,37 b' XXX: we should have a flag in `hg debugs'
70 treemanifest (tree !)
70 treemanifest (tree !)
71
71
72 $ hg debugrebuilddirstate
72 $ hg debugrebuilddirstate
73
74 We only make the following assertions for the flat test case since in the
75 treemanifest test case debugsparse fails with "path ends in directory
76 separator: outside/" which seems like a bug unrelated to the regression this is
77 testing for.
78
79 #if flat
80 widening with both sparse and narrow is possible
81
82 $ cat >> .hg/hgrc <<EOF
83 > [extensions]
84 > sparse =
85 > narrow =
86 > EOF
87
88 $ hg debugsparse -X outside/f -X widest/f
89 $ hg tracked -q --addinclude outside/f
90 $ tree
91 .
92 `-- inside
93 `-- f
94
95 1 directory, 1 file
96
97 $ hg debugsparse -d outside/f
98 $ tree
99 .
100 |-- inside
101 | `-- f
102 `-- outside
103 `-- f
104
105 2 directories, 2 files
106 #endif
General Comments 0
You need to be logged in to leave comments. Login now