Show More
@@ -1163,13 +1163,11 b' def _matchfiles(repo, subset, x):' | |||||
1163 | # initialized. Use 'd:' to set the default matching mode, default |
|
1163 | # initialized. Use 'd:' to set the default matching mode, default | |
1164 | # to 'glob'. At most one 'r:' and 'd:' argument can be passed. |
|
1164 | # to 'glob'. At most one 'r:' and 'd:' argument can be passed. | |
1165 |
|
1165 | |||
1166 | # i18n: "_matchfiles" is a keyword |
|
1166 | l = getargs(x, 1, -1, "_matchfiles requires at least one argument") | |
1167 | l = getargs(x, 1, -1, _("_matchfiles requires at least one argument")) |
|
|||
1168 | pats, inc, exc = [], [], [] |
|
1167 | pats, inc, exc = [], [], [] | |
1169 | rev, default = None, None |
|
1168 | rev, default = None, None | |
1170 | for arg in l: |
|
1169 | for arg in l: | |
1171 | # i18n: "_matchfiles" is a keyword |
|
1170 | s = getstring(arg, "_matchfiles requires string arguments") | |
1172 | s = getstring(arg, _("_matchfiles requires string arguments")) |
|
|||
1173 | prefix, value = s[:2], s[2:] |
|
1171 | prefix, value = s[:2], s[2:] | |
1174 | if prefix == 'p:': |
|
1172 | if prefix == 'p:': | |
1175 | pats.append(value) |
|
1173 | pats.append(value) | |
@@ -1179,20 +1177,17 b' def _matchfiles(repo, subset, x):' | |||||
1179 | exc.append(value) |
|
1177 | exc.append(value) | |
1180 | elif prefix == 'r:': |
|
1178 | elif prefix == 'r:': | |
1181 | if rev is not None: |
|
1179 | if rev is not None: | |
1182 | # i18n: "_matchfiles" is a keyword |
|
1180 | raise error.ParseError('_matchfiles expected at most one ' | |
1183 | raise error.ParseError(_('_matchfiles expected at most one ' |
|
1181 | 'revision') | |
1184 | 'revision')) |
|
|||
1185 | if value != '': # empty means working directory; leave rev as None |
|
1182 | if value != '': # empty means working directory; leave rev as None | |
1186 | rev = value |
|
1183 | rev = value | |
1187 | elif prefix == 'd:': |
|
1184 | elif prefix == 'd:': | |
1188 | if default is not None: |
|
1185 | if default is not None: | |
1189 | # i18n: "_matchfiles" is a keyword |
|
1186 | raise error.ParseError('_matchfiles expected at most one ' | |
1190 | raise error.ParseError(_('_matchfiles expected at most one ' |
|
1187 | 'default mode') | |
1191 | 'default mode')) |
|
|||
1192 | default = value |
|
1188 | default = value | |
1193 | else: |
|
1189 | else: | |
1194 | # i18n: "_matchfiles" is a keyword |
|
1190 | raise error.ParseError('invalid _matchfiles prefix: %s' % prefix) | |
1195 | raise error.ParseError(_('invalid _matchfiles prefix: %s') % prefix) |
|
|||
1196 | if not default: |
|
1191 | if not default: | |
1197 | default = 'glob' |
|
1192 | default = 'glob' | |
1198 |
|
1193 |
General Comments 0
You need to be logged in to leave comments.
Login now