Show More
@@ -22,6 +22,18 b' import basestore' | |||||
22 |
|
22 | |||
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- |
|
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- | |
24 |
|
24 | |||
|
25 | def composelargefilematcher(match, manifest): | |||
|
26 | '''create a matcher that matches only the largefiles in the original | |||
|
27 | matcher''' | |||
|
28 | m = copy.copy(match) | |||
|
29 | lfile = lambda f: lfutil.standin(f) in manifest | |||
|
30 | m._files = filter(lfile, m._files) | |||
|
31 | m._fmap = set(m._files) | |||
|
32 | m._always = False | |||
|
33 | origmatchfn = m.matchfn | |||
|
34 | m.matchfn = lambda f: lfile(f) and origmatchfn(f) | |||
|
35 | return m | |||
|
36 | ||||
25 | def composenormalfilematcher(match, manifest): |
|
37 | def composenormalfilematcher(match, manifest): | |
26 | m = copy.copy(match) |
|
38 | m = copy.copy(match) | |
27 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
|
39 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in | |
@@ -146,7 +158,8 b' def removelargefiles(ui, repo, isaddremo' | |||||
146 | after = opts.get('after') |
|
158 | after = opts.get('after') | |
147 | if not pats and not after: |
|
159 | if not pats and not after: | |
148 | raise util.Abort(_('no files specified')) |
|
160 | raise util.Abort(_('no files specified')) | |
149 | m = scmutil.match(repo[None], pats, opts) |
|
161 | m = composelargefilematcher(scmutil.match(repo[None], pats, opts), | |
|
162 | repo[None].manifest()) | |||
150 | try: |
|
163 | try: | |
151 | repo.lfstatus = True |
|
164 | repo.lfstatus = True | |
152 | s = repo.status(match=m, clean=True) |
|
165 | s = repo.status(match=m, clean=True) | |
@@ -950,7 +963,8 b' def overrideforget(orig, ui, repo, *pats' | |||||
950 | installnormalfilesmatchfn(repo[None].manifest()) |
|
963 | installnormalfilesmatchfn(repo[None].manifest()) | |
951 | result = orig(ui, repo, *pats, **opts) |
|
964 | result = orig(ui, repo, *pats, **opts) | |
952 | restorematchfn() |
|
965 | restorematchfn() | |
953 | m = scmutil.match(repo[None], pats, opts) |
|
966 | m = composelargefilematcher(scmutil.match(repo[None], pats, opts), | |
|
967 | repo[None].manifest()) | |||
954 |
|
968 | |||
955 | try: |
|
969 | try: | |
956 | repo.lfstatus = True |
|
970 | repo.lfstatus = True |
@@ -164,6 +164,8 b' ignore = [' | |||||
164 | '_ssl', # conditional imports in the stdlib, issue1964 |
|
164 | '_ssl', # conditional imports in the stdlib, issue1964 | |
165 | 'rfc822', |
|
165 | 'rfc822', | |
166 | 'mimetools', |
|
166 | 'mimetools', | |
|
167 | # setuptools 8 expects this module to explode early when not on windows | |||
|
168 | 'distutils.msvc9compiler' | |||
167 | ] |
|
169 | ] | |
168 |
|
170 | |||
169 | def isenabled(): |
|
171 | def isenabled(): |
@@ -1,6 +1,16 b'' | |||||
1 | from mercurial import demandimport |
|
1 | from mercurial import demandimport | |
2 | demandimport.enable() |
|
2 | demandimport.enable() | |
3 |
|
3 | |||
|
4 | import os | |||
|
5 | if os.name != 'nt': | |||
|
6 | try: | |||
|
7 | import distutils.msvc9compiler | |||
|
8 | print ('distutils.msvc9compiler needs to be an immediate ' | |||
|
9 | 'importerror on non-windows platforms') | |||
|
10 | distutils.msvc9compiler | |||
|
11 | except ImportError: | |||
|
12 | pass | |||
|
13 | ||||
4 | import re |
|
14 | import re | |
5 |
|
15 | |||
6 | rsub = re.sub |
|
16 | rsub = re.sub |
@@ -134,3 +134,22 b' Test permission of files created by push' | |||||
134 | $ cd .. |
|
134 | $ cd .. | |
135 |
|
135 | |||
136 | #endif |
|
136 | #endif | |
|
137 | ||||
|
138 | Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say | |||
|
139 | it is missing, but a remove on a nonexistant unknown file still should. Same | |||
|
140 | for a forget.) | |||
|
141 | ||||
|
142 | $ cd src | |||
|
143 | $ touch x | |||
|
144 | $ hg add x | |||
|
145 | $ mv x y | |||
|
146 | $ hg remove -A x y ENOENT | |||
|
147 | ENOENT: * (glob) | |||
|
148 | not removing y: file is untracked | |||
|
149 | [1] | |||
|
150 | $ hg add y | |||
|
151 | $ mv y z | |||
|
152 | $ hg forget y z ENOENT | |||
|
153 | ENOENT: * (glob) | |||
|
154 | not removing z: file is already untracked | |||
|
155 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now