##// END OF EJS Templates
memfilectx: make changectx argument mandatory in constructor (API)...
memfilectx: make changectx argument mandatory in constructor (API) committablefilectx has three subclasses: workingfilectx, memfilectx, and overlayfilectx. committablefilectx takes an optional (change) ctx instance to its constructor. If it's provided, it's set on the instance as self._changectx. If not, that property is supposed to be defined by the class. However, only workingfilectx does that. The other two will have the property undefined if it's not passed in the constructor. That seems bad to me. This patch makes the changectx argument to the memfilectx constructor mandatory because that fixes the failure I ran into. It seems like we should also fix the overlayfilectx case. Differential Revision: https://phab.mercurial-scm.org/D1658

File last commit:

r30741:fde9692a default
r35401:8a0cac20 default
Show More
hgclient.h
30 lines | 846 B | text/x-c | CLexer
/*
* A command server client that uses Unix domain socket
*
* Copyright (c) 2011 Yuya Nishihara <yuya@tcha.org>
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2 or any later version.
*/
#ifndef HGCLIENT_H_
#define HGCLIENT_H_
#include <sys/types.h>
struct hgclient_tag_;
typedef struct hgclient_tag_ hgclient_t;
hgclient_t *hgc_open(const char *sockname);
void hgc_close(hgclient_t *hgc);
pid_t hgc_peerpgid(const hgclient_t *hgc);
pid_t hgc_peerpid(const hgclient_t *hgc);
const char **hgc_validate(hgclient_t *hgc, const char *const args[],
size_t argsize);
int hgc_runcommand(hgclient_t *hgc, const char *const args[], size_t argsize);
void hgc_attachio(hgclient_t *hgc);
void hgc_setenv(hgclient_t *hgc, const char *const envp[]);
#endif /* HGCLIENT_H_ */