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
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 5, 2018, 19:41 UTC
Message-ID
<CAPig+cTSrzmOtYPwPWLpGfDa5tt0SV6Aq8SmhYTTicK0ikst7Q@mail.gmail.com>
In-Reply-To
<CAE5ih7-1StB8RNrobO+hpG2QOSdoscUNfVP9+muZV0_b+m+XSw@mail.gmail.com>
On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand <luke@diamand.org> wrote:
Show 16 quoted lines
> 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(?).
Show 10 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.
Previous: Luke DiamandNext: Luke Diamand
Message 5 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.