git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

From
Luke Diamand <luke@diamand.org>
Date
Jun 5, 2018, 22:14 UTC
Message-ID
<CAE5ih7-HMRJ3nFNuQCXmJEC4Ar4PZY=_4Q=4gDK+VTFRhMvCGA@mail.gmail.com>
In-Reply-To
<CAPig+cTSrzmOtYPwPWLpGfDa5tt0SV6Aq8SmhYTTicK0ikst7Q@mail.gmail.com>
On 5 June 2018 at 20:41, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 19 quoted lines
> On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand <luke@diamand.org> wrote:
>> On 5 June 2018 at 10:54, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand <luke@diamand.org> 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(?).
There's some code elsewhere that suggests it's being kept alive:
    // Retired ErrorIds. We need to keep these so that clients
    // built with newer apis can commnunicate with older servers
    // still sending these.
    static ErrorId MaxResults; // DEPRECATED
    static ErrorId MaxScanRows; // DEPRECATED
Show 13 quoted lines
>
>>     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.
I'll check it works OK on Windows; charset translation might cause a problem.
Previous: Eric SunshineNext: Luke Diamand
Message 6 of 10 in “[PATCHv1 0/3] git-p4: improvements to p4 "blocking"”
  1. Luke DiamandJun 5, 2018
  2. 1/3 git-p4: raise exceptions from p4CmdList based on error from p4 serverLuke Diamand, Jun 5, 2018
  3. Eric SunshineJun 5, 2018
  4. Luke DiamandJun 5, 2018
  5. Eric SunshineJun 5, 2018
  6. Luke DiamandJun 5, 2018
  7. Luke DiamandJun 8, 2018
  8. 2/3 git-p4: narrow the scope of exceptions caught when parsing an intLuke Diamand, Jun 5, 2018
  9. 3/3 git-p4: auto-size the blockLuke Diamand, Jun 5, 2018
  10. Eric SunshineJun 5, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.