`hg commit foo` fails when the only modified files under foo are largefiles. Steps to reproduce: hg init blah cd blah mkdir -p foo/bar/baz touch foo/bar/baz/meh hg add --large foo/bar/baz/meh hg commit -mfoo foo Expected result: meh is committed as a largefile Actual result: abort: foo: no match under directory! Using: Mercurial Distributed SCM (version 2.2.3+31-2e13c1bd34dc)
The problem seems to be the strict checking localrepository.commit() does. On or about localrepo.py:1290 is the following ('changes' coming from status()): matched = set(changes[0] + changes[1] + changes[2]) for f in match.files(): if f == '.' or f in matched or f in wctx.substate: continue if f in changes[3]: # missing fail(f, _('file not found!')) if f in vdirs: # visited directory d = f + '/' for mf in matched: if mf.startswith(d): # This is the problem break else: fail(f, _("no match under directory!")) The problem is 'mf' is '.hglf/foo/bar/baz/meh', but 'd' is 'foo/'. I'm not sure what the proper fix is- maybe something on the matcher, since largefiles is hacking that up before passing it in anyway?
*** Bug 3491 has been marked as a duplicate of this bug. ***
Fixed by http://selenic.com/repo/hg/rev/7e2b9f6a2cd0 Levi Bard <levi@unity3d.com> largefiles: commit directories that only contain largefiles (issue3548) If we pass a directory to commit whose only commitable files are largefiles, the core commit code aborts before finding the largefiles. So we do the following: For directories that only have largefiles as matches, we explicitly add the largefiles to the matchlist and remove the directory. In other cases, we leave the match list unmodified. (please test the fix)