Comments
Patch
@@ -52,14 +52,12 @@
$ hg files
inside/f
-XXX: we should not have sparse enabled
- $ cat .hg/sparse
- [include]
- inside/f
+XXX: we should have a flag in `hg debugsparse` to list the sparse profile
+ $ test -f .hg/sparse
+ [1]
$ cat .hg/requires
dotencode
- exp-sparse
fncache
generaldelta
narrowhg-experimental
@@ -141,6 +141,7 @@
include_pat = opts.get(r'include')
exclude_pat = opts.get(r'exclude')
enableprofile_pat = opts.get(r'enable_profile')
+ narrow_pat = opts.get(r'narrow')
include = exclude = enableprofile = False
if include_pat:
pat = include_pat
@@ -153,7 +154,9 @@
enableprofile = True
if sum([include, exclude, enableprofile]) > 1:
raise error.Abort(_("too many flags specified."))
- if include or exclude or enableprofile:
+ # if --narrow is passed, it means they are includes and excludes for narrow
+ # clone
+ if not narrow_pat and (include or exclude or enableprofile):
def clonesparse(orig, self, node, overwrite, *args, **kwargs):
sparse.updateconfig(self.unfiltered(), pat, {}, include=include,
exclude=exclude, enableprofile=enableprofile,