Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/lfutil.py @ 18724:894a5897a9dd stable
largefiles: getstandinmatcher should not depend on existence of directories
Looking for a (potentially empty) directory was not reliable - both because it
is a reasonable assumption that empty directories can be removed and because it
wasn't created in all cases ... such as when pulling to an existing repository.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Feb 2013 13:45:18 +0100 |
parents | 877f80599df0 |
children | 9717a326d270 |
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py Thu Feb 28 13:44:59 2013 +0100 +++ b/hgext/largefiles/lfutil.py Thu Feb 28 13:45:18 2013 +0100 @@ -225,13 +225,9 @@ standindir = repo.wjoin(shortname) if pats: pats = [os.path.join(standindir, pat) for pat in pats] - elif os.path.isdir(standindir): + else: # no patterns: relative to repo root pats = [standindir] - else: - # no patterns and no standin dir: return matcher that matches nothing - return match_.match(repo.root, None, [], exact=True) - # no warnings about missing files or directories match = scmutil.match(repo[None], pats, opts) match.bad = lambda f, msg: None