[PATCH 08 of 10] chg: implement validate in hgclient
Jun Wu
quark at fb.com
Wed Mar 2 10:08:53 EST 2016
On 03/02/2016 02:42 PM, timeless wrote:
> Jun Wu <quark at fb.com> wrote:
>> + * Send command line arguments to let the server decide whether it has the
>> + * up-to-date config, extensions and can handle our request.
>
> I can't tell what this means.
>
> you wouldn't normally write `the up-to-date` it would normally be `an
> up-to-date` (the implies it would be unique in a certain way, but
> presumably there can be a number of concurrent chgservers each with
> respectfully up-to-date configurations).
>
> But, I also don't understand `extensions` after it. You might want to
> replace `config,` with `config and`, and then `and can` with `and thus
> can` (you can choose another word to replace thus, the key is that the
> first and is to join a short item list, the second is to join parts of
> the sentence).
Thanks for your comments (and other replies to the series).
How about changing to this:
/*!
* Send command line arguments to let the server load the repo config and check
* whether it can process our request directly or not.
* Make sure hgc_setenv is called before calling this.
*
* @return - NULL, the server believes it can handle our request, or does not
* support "validate" command.
* - a list of strings, the server cannot handle our request and it
* sent instructions telling us how to fix the issue. See
* chgserver.py for possible instruction formats.
* the list (not the strings) must be freed by the caller.
* the last string is guaranteed to be NULL.
*/
I now think it's hard to explain how the server will do the actual check, so
it may be better to just skip the confusing words "config", "extensions".
>> + /* the server returns '\0' if it passed validation */
>
> validation passed (? -- I'm less certain about this form)
How about:
/* the server returns '\0' if it can handle our request */
More information about the Mercurial-devel
mailing list