On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand <[email protected]> wrote:
> On 5 June 2018 at 10:54, Eric Sunshine <[email protected]> wrote:
> > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand <[email protected]> wrote:
> >> + m = re.search('Too many rows scanned \(over (\d+)\)',
> >> data)
> >> + if not m:
> >> + m = re.search('Request too large \(over (\d+)\)',
> >> data)
> >
> > Does 'p4' localize these error messages?
>
> That's a good question.
>
> It turns out that Perforce open-sourced the P4 client in 2014 (I only
> recently found this out) so we can actually look at the code now!
>
> Here's the code:
>
> // ErrorId graveyard: retired/deprecated ErrorIds.
Hmm, the "too many rows" error you're seeing is retired/deprecated(?).
> ErrorId MsgDb::MaxResults = { ErrorOf( ES_DB, 32,
> E_FAILED, EV_ADMIN, 1 ), "Request too large (over %maxResults%); see
> 'p4 help maxresults'." } ;//NOTRANS
> ErrorId MsgDb::MaxScanRows = { ErrorOf( ES_DB, 61,
> E_FAILED, EV_ADMIN, 1 ), "Too many rows scanned (over %maxScanRows%);
> see 'p4 help maxscanrows'." } ;//NOTRANS
>
> I don't think there's actually a way to make it return any language
> other than English though. [...]
> So I think probably the language is always English.
The "NOTRANS" annotation on the error messages is reassuring.