94 # A good default size allows most source code files to be fixed, but avoids |
94 # A good default size allows most source code files to be fixed, but avoids |
95 # letting fixer tools choke on huge inputs, which could be surprising to the |
95 # letting fixer tools choke on huge inputs, which could be surprising to the |
96 # user. |
96 # user. |
97 configitem('fix', 'maxfilesize', default='2MB') |
97 configitem('fix', 'maxfilesize', default='2MB') |
98 |
98 |
99 @command('fix', |
99 allopt = ('', 'all', False, _('fix all non-public non-obsolete revisions')) |
100 [('', 'all', False, _('fix all non-public non-obsolete revisions')), |
100 baseopt = ('', 'base', [], _('revisions to diff against (overrides automatic ' |
101 ('', 'base', [], _('revisions to diff against (overrides automatic ' |
101 'selection, and applies to every revision being ' |
102 'selection, and applies to every revision being ' |
102 'fixed)'), _('REV')) |
103 'fixed)'), _('REV')), |
103 revopt = ('r', 'rev', [], _('revisions to fix'), _('REV')) |
104 ('r', 'rev', [], _('revisions to fix'), _('REV')), |
104 wdiropt = ('w', 'working-dir', False, _('fix the working directory')) |
105 ('w', 'working-dir', False, _('fix the working directory')), |
105 wholeopt = ('', 'whole', False, _('always fix every line of a file')) |
106 ('', 'whole', False, _('always fix every line of a file'))], |
106 usage = _('[OPTION]... [FILE]...') |
107 _('[OPTION]... [FILE]...')) |
107 |
|
108 @command('fix', [allopt, baseopt, revopt, wdiropt, wholeopt], usage) |
108 def fix(ui, repo, *pats, **opts): |
109 def fix(ui, repo, *pats, **opts): |
109 """rewrite file content in changesets or working directory |
110 """rewrite file content in changesets or working directory |
110 |
111 |
111 Runs any configured tools to fix the content of files. Only affects files |
112 Runs any configured tools to fix the content of files. Only affects files |
112 with changes, unless file arguments are provided. Only affects changed lines |
113 with changes, unless file arguments are provided. Only affects changed lines |