--- a/hgext/largefiles/overrides.py Thu Dec 11 22:51:29 2014 -0800
+++ b/hgext/largefiles/overrides.py Mon Dec 22 17:26:21 2014 -0600
@@ -22,6 +22,18 @@
# -- Utility functions: commonly/repeatedly needed functionality ---------------
+def composelargefilematcher(match, manifest):
+ '''create a matcher that matches only the largefiles in the original
+ matcher'''
+ m = copy.copy(match)
+ lfile = lambda f: lfutil.standin(f) in manifest
+ m._files = filter(lfile, m._files)
+ m._fmap = set(m._files)
+ m._always = False
+ origmatchfn = m.matchfn
+ m.matchfn = lambda f: lfile(f) and origmatchfn(f)
+ return m
+
def composenormalfilematcher(match, manifest):
m = copy.copy(match)
notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in
@@ -146,7 +158,8 @@
after = opts.get('after')
if not pats and not after:
raise util.Abort(_('no files specified'))
- m = scmutil.match(repo[None], pats, opts)
+ m = composelargefilematcher(scmutil.match(repo[None], pats, opts),
+ repo[None].manifest())
try:
repo.lfstatus = True
s = repo.status(match=m, clean=True)
@@ -950,7 +963,8 @@
installnormalfilesmatchfn(repo[None].manifest())
result = orig(ui, repo, *pats, **opts)
restorematchfn()
- m = scmutil.match(repo[None], pats, opts)
+ m = composelargefilematcher(scmutil.match(repo[None], pats, opts),
+ repo[None].manifest())
try:
repo.lfstatus = True
--- a/mercurial/demandimport.py Thu Dec 11 22:51:29 2014 -0800
+++ b/mercurial/demandimport.py Mon Dec 22 17:26:21 2014 -0600
@@ -164,6 +164,8 @@
'_ssl', # conditional imports in the stdlib, issue1964
'rfc822',
'mimetools',
+ # setuptools 8 expects this module to explode early when not on windows
+ 'distutils.msvc9compiler'
]
def isenabled():
--- a/tests/test-demandimport.py Thu Dec 11 22:51:29 2014 -0800
+++ b/tests/test-demandimport.py Mon Dec 22 17:26:21 2014 -0600
@@ -1,6 +1,16 @@
from mercurial import demandimport
demandimport.enable()
+import os
+if os.name != 'nt':
+ try:
+ import distutils.msvc9compiler
+ print ('distutils.msvc9compiler needs to be an immediate '
+ 'importerror on non-windows platforms')
+ distutils.msvc9compiler
+ except ImportError:
+ pass
+
import re
rsub = re.sub
--- a/tests/test-largefiles-cache.t Thu Dec 11 22:51:29 2014 -0800
+++ b/tests/test-largefiles-cache.t Mon Dec 22 17:26:21 2014 -0600
@@ -134,3 +134,22 @@
$ cd ..
#endif
+
+Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
+it is missing, but a remove on a nonexistant unknown file still should. Same
+for a forget.)
+
+ $ cd src
+ $ touch x
+ $ hg add x
+ $ mv x y
+ $ hg remove -A x y ENOENT
+ ENOENT: * (glob)
+ not removing y: file is untracked
+ [1]
+ $ hg add y
+ $ mv y z
+ $ hg forget y z ENOENT
+ ENOENT: * (glob)
+ not removing z: file is already untracked
+ [1]