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

Re: [PATCHv1 1/1] git-p4: better error reporting when p4 fails

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 5, 2018, 19:44 UTC
Message-ID
<CAPig+cSP5RJedaoO1T=j4qmbAGmrNh_bJkamKcJRS+kF5wq0JQ@mail.gmail.com>
In-Reply-To
<CAE5ih7_01ZixwnFP2kGN9Y5M26MyNai82USUr2UfunL3Ubztdg@mail.gmail.com>
On Tue, Jun 5, 2018 at 6:59 AM Luke Diamand <luke@diamand.org> wrote:
Show 19 quoted lines
> On 5 June 2018 at 11:49, Merland Romain <merlorom@yahoo.fr> wrote:
> >> +    # now check that we can actually talk to the server
> >> +    global p4_access_checked
> >> +    if not p4_access_checked:
> >> +        p4_access_checked = True
> >> +        p4_check_access()
> >> +
> >
> > Just switch the 2 lines 'p4_access_checked = True' and 'p4_check_access()'
> > It seems to me more logical
>
> Like this:
>
> +        p4_check_access()
> +        p4_access_checked = True
>
> You need to set p4_access_checked first so that it doesn't go and try
> to check the p4 access before running "p4 login -s", which would then
> get stuck forever.
Such subtlety may deserve an in-code comment.
Previous: Luke Diamand
Message 4 of 4 in “[PATCHv1 0/1] git-p4: better error reporting”
  1. Luke DiamandJun 5, 2018
  2. 1/1 git-p4: better error reporting when p4 failsLuke Diamand, Jun 5, 2018
  3. Luke DiamandJun 5, 2018
  4. 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.