Show More
@@ -171,7 +171,7 b' FIXER_ATTRS = {' | |||
|
171 | 171 | 'linerange': None, |
|
172 | 172 | 'pattern': None, |
|
173 | 173 | 'priority': 0, |
|
174 |
'metadata': |
|
|
174 | 'metadata': 'false', | |
|
175 | 175 | 'skipclean': 'true', |
|
176 | 176 | } |
|
177 | 177 | |
@@ -724,6 +724,7 b' def getfixers(ui):' | |||
|
724 | 724 | setattr(fixers[name], pycompat.sysstr('_' + key), |
|
725 | 725 | attrs.get(key, default)) |
|
726 | 726 | fixers[name]._priority = int(fixers[name]._priority) |
|
727 | fixers[name]._metadata = stringutil.parsebool(fixers[name]._metadata) | |
|
727 | 728 | fixers[name]._skipclean = stringutil.parsebool(fixers[name]._skipclean) |
|
728 | 729 | # Don't use a fixer if it has no pattern configured. It would be |
|
729 | 730 | # dangerous to let it affect all files. It would be pointless to let it |
@@ -43,6 +43,9 b' processing phase stable.' | |||
|
43 | 43 | > [extensions] |
|
44 | 44 | > fix = |
|
45 | 45 | > [fix] |
|
46 | > metadatafalse:command=cat $TESTTMP/missing | |
|
47 | > metadatafalse:pattern=metadatafalse | |
|
48 | > metadatafalse:metadata=false | |
|
46 | 49 | > missing:command=cat $TESTTMP/missing |
|
47 | 50 | > missing:pattern=missing |
|
48 | 51 | > missing:metadata=true |
@@ -65,6 +68,7 b' some write back to the file.' | |||
|
65 | 68 | $ hg init repo |
|
66 | 69 | $ cd repo |
|
67 | 70 | |
|
71 | $ printf "old content\n" > metadatafalse | |
|
68 | 72 | $ printf "old content\n" > invalid |
|
69 | 73 | $ printf "old content\n" > missing |
|
70 | 74 | $ printf "old content\n" > valid |
@@ -72,15 +76,20 b' some write back to the file.' | |||
|
72 | 76 | |
|
73 | 77 | $ hg fix -w |
|
74 | 78 | ignored invalid output from fixer tool: invalid |
|
79 | fixed metadatafalse in revision 2147483647 using metadatafalse | |
|
75 | 80 | ignored invalid output from fixer tool: missing |
|
76 | 81 | fixed valid in revision 2147483647 using valid |
|
77 | 82 | saw "key" 1 times |
|
78 | 83 | fixed 1 files with valid |
|
79 | 84 | fixed the working copy |
|
80 | 85 | |
|
81 | $ cat missing invalid valid | |
|
86 | $ cat metadatafalse | |
|
87 | new content | |
|
88 | $ cat missing | |
|
82 | 89 | old content |
|
90 | $ cat invalid | |
|
83 | 91 | old content |
|
92 | $ cat valid | |
|
84 | 93 | new content |
|
85 | 94 | |
|
86 | 95 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now