# HG changeset patch # User Mads Kiilerich # Date 2013-02-28 12:45:18 # 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 --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -225,13 +225,9 @@ def getstandinmatcher(repo, pats=[], opt 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 --git a/tests/test-issue3084.t b/tests/test-issue3084.t --- a/tests/test-issue3084.t +++ b/tests/test-issue3084.t @@ -31,6 +31,8 @@ Normal file in the working copy, keeping 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 --git a/tests/test-largefiles-cache.t b/tests/test-largefiles-cache.t --- a/tests/test-largefiles-cache.t +++ b/tests/test-largefiles-cache.t @@ -73,6 +73,20 @@ Update working directory to tip, again. ! 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: