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.
--- 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
--- 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
--- 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: