Show More
@@ -141,6 +141,7 b' def _clonesparsecmd(orig, ui, repo, *arg' | |||||
141 | include_pat = opts.get(r'include') |
|
141 | include_pat = opts.get(r'include') | |
142 | exclude_pat = opts.get(r'exclude') |
|
142 | exclude_pat = opts.get(r'exclude') | |
143 | enableprofile_pat = opts.get(r'enable_profile') |
|
143 | enableprofile_pat = opts.get(r'enable_profile') | |
|
144 | narrow_pat = opts.get(r'narrow') | |||
144 | include = exclude = enableprofile = False |
|
145 | include = exclude = enableprofile = False | |
145 | if include_pat: |
|
146 | if include_pat: | |
146 | pat = include_pat |
|
147 | pat = include_pat | |
@@ -153,7 +154,9 b' def _clonesparsecmd(orig, ui, repo, *arg' | |||||
153 | enableprofile = True |
|
154 | enableprofile = True | |
154 | if sum([include, exclude, enableprofile]) > 1: |
|
155 | if sum([include, exclude, enableprofile]) > 1: | |
155 | raise error.Abort(_("too many flags specified.")) |
|
156 | raise error.Abort(_("too many flags specified.")) | |
156 | if include or exclude or enableprofile: |
|
157 | # if --narrow is passed, it means they are includes and excludes for narrow | |
|
158 | # clone | |||
|
159 | if not narrow_pat and (include or exclude or enableprofile): | |||
157 | def clonesparse(orig, self, node, overwrite, *args, **kwargs): |
|
160 | def clonesparse(orig, self, node, overwrite, *args, **kwargs): | |
158 | sparse.updateconfig(self.unfiltered(), pat, {}, include=include, |
|
161 | sparse.updateconfig(self.unfiltered(), pat, {}, include=include, | |
159 | exclude=exclude, enableprofile=enableprofile, |
|
162 | exclude=exclude, enableprofile=enableprofile, |
@@ -52,14 +52,12 b' narrow clone the inside file' | |||||
52 | $ hg files |
|
52 | $ hg files | |
53 | inside/f |
|
53 | inside/f | |
54 |
|
54 | |||
55 | XXX: we should not have sparse enabled |
|
55 | XXX: we should have a flag in `hg debugsparse` to list the sparse profile | |
56 |
$ |
|
56 | $ test -f .hg/sparse | |
57 | [include] |
|
57 | [1] | |
58 | inside/f |
|
|||
59 |
|
58 | |||
60 | $ cat .hg/requires |
|
59 | $ cat .hg/requires | |
61 | dotencode |
|
60 | dotencode | |
62 | exp-sparse |
|
|||
63 | fncache |
|
61 | fncache | |
64 | generaldelta |
|
62 | generaldelta | |
65 | narrowhg-experimental |
|
63 | narrowhg-experimental |
General Comments 0
You need to be logged in to leave comments.
Login now