# HG changeset patch # User Mads Kiilerich # Date 1362055518 -3600 # Node ID 894a5897a9dd457c148447f1f71aab020d13eb75 # Parent e56f7cd8c67bc94a7f5c3fd9ec3bf4cc726a3103 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. diff -r e56f7cd8c67b -r 894a5897a9dd hgext/largefiles/lfutil.py --- 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 diff -r e56f7cd8c67b -r 894a5897a9dd tests/test-issue3084.t --- a/tests/test-issue3084.t Thu Feb 28 13:44:59 2013 +0100 +++ b/tests/test-issue3084.t Thu Feb 28 13:45:18 2013 +0100 @@ -31,6 +31,8 @@ foo has been turned into a largefile use (l)argefile or keep as (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (branch merge, don't forget to commit) + getting changed largefiles + 0 largefiles updated, 0 removed $ hg status $ cat foo diff -r e56f7cd8c67b -r 894a5897a9dd tests/test-largefiles-cache.t --- a/tests/test-largefiles-cache.t Thu Feb 28 13:44:59 2013 +0100 +++ b/tests/test-largefiles-cache.t Thu Feb 28 13:45:18 2013 +0100 @@ -73,6 +73,20 @@ ! large $ cd .. +Verify that largefiles from pulled branchheads are fetched, also to an empty repo + + $ hg init mirror2 + $ hg -R mirror2 pull src -r0 + pulling from src + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + (run 'hg update' to get a working copy) + caching new largefiles + abort: *: '$TESTTMP/mirror2/.hg/largefiles/.7f7097b041ccf68cc5561e9600da4655d21c6d18.*' (glob) + [255] + #if unix-permissions Portable way to print file permissions: