Show More
@@ -46,8 +46,10 b' tool needs to operate on unchanged files' | |||||
46 | to false. |
|
46 | to false. | |
47 |
|
47 | |||
48 | The :pattern suboption determines which files will be passed through each |
|
48 | The :pattern suboption determines which files will be passed through each | |
49 |
configured tool. See :hg:`help patterns` for possible values. |
|
49 | configured tool. See :hg:`help patterns` for possible values. However, all | |
50 | arguments to :hg:`fix`, the intersection of these patterns is used. |
|
50 | patterns are relative to the repo root, even if that text says they are relative | |
|
51 | to the current working directory. If there are file arguments to :hg:`fix`, the | |||
|
52 | intersection of these patterns is used. | |||
51 |
|
53 | |||
52 | There is also a configurable limit for the maximum size of file that will be |
|
54 | There is also a configurable limit for the maximum size of file that will be | |
53 | processed by :hg:`fix`:: |
|
55 | processed by :hg:`fix`:: | |
@@ -140,6 +142,7 b' from mercurial import (' | |||||
140 | context, |
|
142 | context, | |
141 | copies, |
|
143 | copies, | |
142 | error, |
|
144 | error, | |
|
145 | match as matchmod, | |||
143 | mdiff, |
|
146 | mdiff, | |
144 | merge, |
|
147 | merge, | |
145 | obsolete, |
|
148 | obsolete, | |
@@ -843,7 +846,11 b' class Fixer(object):' | |||||
843 |
|
846 | |||
844 | def affects(self, opts, fixctx, path): |
|
847 | def affects(self, opts, fixctx, path): | |
845 | """Should this fixer run on the file at the given path and context?""" |
|
848 | """Should this fixer run on the file at the given path and context?""" | |
846 | return scmutil.match(fixctx, [self._pattern], opts)(path) |
|
849 | repo = fixctx.repo() | |
|
850 | matcher = matchmod.match( | |||
|
851 | repo.root, repo.root, [self._pattern], ctx=fixctx | |||
|
852 | ) | |||
|
853 | return matcher(path) | |||
847 |
|
854 | |||
848 | def shouldoutputmetadata(self): |
|
855 | def shouldoutputmetadata(self): | |
849 | """Should the stdout of this fixer start with JSON and a null byte?""" |
|
856 | """Should the stdout of this fixer start with JSON and a null byte?""" |
@@ -157,8 +157,10 b' Help text for fix.' | |||||
157 | :skipclean suboption to false. |
|
157 | :skipclean suboption to false. | |
158 |
|
158 | |||
159 | The :pattern suboption determines which files will be passed through each |
|
159 | The :pattern suboption determines which files will be passed through each | |
160 |
configured tool. See 'hg help patterns' for possible values. |
|
160 | configured tool. See 'hg help patterns' for possible values. However, all | |
161 | arguments to 'hg fix', the intersection of these patterns is used. |
|
161 | patterns are relative to the repo root, even if that text says they are | |
|
162 | relative to the current working directory. If there are file arguments to 'hg | |||
|
163 | fix', the intersection of these patterns is used. | |||
162 |
|
164 | |||
163 | There is also a configurable limit for the maximum size of file that will be |
|
165 | There is also a configurable limit for the maximum size of file that will be | |
164 | processed by 'hg fix': |
|
166 | processed by 'hg fix': | |
@@ -1321,7 +1323,7 b' reasonable with that.' | |||||
1321 | $ echo modified > bar |
|
1323 | $ echo modified > bar | |
1322 | $ hg fix -w bar |
|
1324 | $ hg fix -w bar | |
1323 | $ cat bar |
|
1325 | $ cat bar | |
1324 | modified |
|
1326 | $TESTTMP/subprocesscwd | |
1325 |
|
1327 | |||
1326 | $ cd ../.. |
|
1328 | $ cd ../.. | |
1327 |
|
1329 |
General Comments 0
You need to be logged in to leave comments.
Login now