[PATCH] hg_open: the function that opens the connection with cmdserver
Matt Mackall
mpm at selenic.com
Wed Sep 18 12:36:40 CDT 2013
On Wed, 2013-09-18 at 15:46 +0300, Iulian Stana wrote:
> # HG changeset patch
> # User Iulian Stana <julian.stana at gmail.com>
> # Date 1379448402 -10800
> # Tue Sep 17 23:06:42 2013 +0300
> # Node ID ef0d27967b39aef1a4fd11723c543790c7f394f7
> # Parent f461e172467707156321c20874fde6fb860e52d6
> hg_open: the function that opens the connection with cmdserver
Pushed, thanks, with lots of fixups.
As I mentioned last time:
$ ~/hg/contrib/check-code.py hglib/*
hglib/client.c:15:
> * The function will read the header from the command server and
will
trailing whitespace
hglib/client.c:23:
> if(!handle) {
use space after while/if/do/for
hglib/client.c:28:
> if(handle->bytes_on_pipe == 0){
use space after while/if/do/for
hglib/client.c:29:
> if(read(handle->p_read, &ch_char, 1) < 0){
use space after while/if/do/for
hglib/client.c:32:
> if(read(handle->p_read, &length, sizeof(uint32_t)) < 0){
use space after while/if/do/for
hglib/client.c:68:
> * \retval 0 if succesfull
trailing whitespace
hglib/client.c:70:
> *
trailing whitespace
hglib/client.c:81:
> if(!handle) {
use space after while/if/do/for
hglib/client.c:88:
> if(ch->length == 0){
use space after while/if/do/for
hglib/client.c:94:
> if(nc = read(handle->p_read, buffer, ch->length), nc < 0){
use space after while/if/do/for
hglib/client.c:143:
> } else if (childpid == 0) { /* child */
don't use tabs except for indent
hglib/client.c:146:
> if(dup2(c_read, STDIN_FILENO) < 0){
use space after while/if/do/for
hglib/client.c:150:
> if(dup2(c_write, STDOUT_FILENO) < 0){
use space after while/if/do/for
hglib/client.c:154:
> if(execl("/bin/sh", "sh", "-c", command, NULL) < 0){
use space after while/if/do/for
hglib/client.c:157:
> } else { /* parent */
don't use tabs except for indent
(too many errors, giving up)
hglib/utils.c:9:
> /*
trailing whitespace
hglib/utils.h:6:
> /**
trailing whitespace
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list