version 1.53, 2007/01/26 21:48:17 |
version 1.54, 2007/01/26 21:59:11 |
|
|
{ |
{ |
int l; |
int l; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
char *entry, *parent, *base; |
char entry[CVS_ENT_MAXLINELEN], *parent, *base; |
|
|
STRIP_SLASH(data); |
STRIP_SLASH(data); |
|
|
|
|
if (!strcmp(parent, ".")) |
if (!strcmp(parent, ".")) |
return; |
return; |
|
|
entry = xmalloc(CVS_ENT_MAXLINELEN); |
|
l = snprintf(entry, CVS_ENT_MAXLINELEN, "D/%s////", base); |
l = snprintf(entry, CVS_ENT_MAXLINELEN, "D/%s////", base); |
if (l == -1 || l >= CVS_ENT_MAXLINELEN) |
if (l == -1 || l >= CVS_ENT_MAXLINELEN) |
fatal("client_check_directory: overflow"); |
fatal("client_check_directory: overflow"); |
|
|
entlist = cvs_ent_open(parent); |
entlist = cvs_ent_open(parent); |
cvs_ent_add(entlist, entry); |
cvs_ent_add(entlist, entry); |
cvs_ent_close(entlist, ENT_SYNC); |
cvs_ent_close(entlist, ENT_SYNC); |
|
|
xfree(entry); |
|
} |
} |
|
|
void |
void |
|
|
int l; |
int l; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
struct cvs_ent *ent, *newent; |
struct cvs_ent *ent, *newent; |
char *dir, *entry, rev[16], timebuf[64], sticky[16]; |
char *dir, *e, entry[CVS_ENT_MAXLINELEN], rev[16], timebuf[64]; |
|
char sticky[16]; |
|
|
dir = cvs_remote_input(); |
dir = cvs_remote_input(); |
entry = cvs_remote_input(); |
e = cvs_remote_input(); |
xfree(dir); |
xfree(dir); |
|
|
entlist = cvs_ent_open(data); |
entlist = cvs_ent_open(data); |
newent = cvs_ent_parse(entry); |
newent = cvs_ent_parse(e); |
ent = cvs_ent_get(entlist, newent->ce_name); |
ent = cvs_ent_get(entlist, newent->ce_name); |
xfree(entry); |
xfree(e); |
|
|
entry = xmalloc(CVS_ENT_MAXLINELEN); |
|
|
|
rcsnum_tostr(newent->ce_rev, rev, sizeof(rev)); |
rcsnum_tostr(newent->ce_rev, rev, sizeof(rev)); |
ctime_r(&ent->ce_mtime, timebuf); |
ctime_r(&ent->ce_mtime, timebuf); |
if (timebuf[strlen(timebuf) - 1] == '\n') |
if (timebuf[strlen(timebuf) - 1] == '\n') |
|
|
cvs_ent_free(newent); |
cvs_ent_free(newent); |
cvs_ent_add(entlist, entry); |
cvs_ent_add(entlist, entry); |
cvs_ent_close(entlist, ENT_SYNC); |
cvs_ent_close(entlist, ENT_SYNC); |
|
|
xfree(entry); |
|
} |
} |
|
|
void |
void |
|
|
struct cvs_ent *e; |
struct cvs_ent *e; |
const char *errstr; |
const char *errstr; |
struct timeval tv[2]; |
struct timeval tv[2]; |
char timebuf[32], repo[MAXPATHLEN], *rpath, *entry, *mode; |
char timebuf[32], repo[MAXPATHLEN], *rpath, entry[CVS_ENT_MAXLINELEN]; |
char revbuf[32], *len, *fpath, *wdir; |
char *en, *mode, revbuf[32], *len, *fpath, *wdir; |
|
|
client_check_directory(data); |
client_check_directory(data); |
|
|
rpath = cvs_remote_input(); |
rpath = cvs_remote_input(); |
entry = cvs_remote_input(); |
en = cvs_remote_input(); |
mode = cvs_remote_input(); |
mode = cvs_remote_input(); |
len = cvs_remote_input(); |
len = cvs_remote_input(); |
|
|
|
|
if (timebuf[strlen(timebuf) - 1] == '\n') |
if (timebuf[strlen(timebuf) - 1] == '\n') |
timebuf[strlen(timebuf) - 1] = '\0'; |
timebuf[strlen(timebuf) - 1] = '\0'; |
|
|
e = cvs_ent_parse(entry); |
e = cvs_ent_parse(en); |
xfree(entry); |
xfree(en); |
rcsnum_tostr(e->ce_rev, revbuf, sizeof(revbuf)); |
rcsnum_tostr(e->ce_rev, revbuf, sizeof(revbuf)); |
entry = xmalloc(CVS_ENT_MAXLINELEN); |
|
l = snprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s//", e->ce_name, |
l = snprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s//", e->ce_name, |
revbuf, timebuf); |
revbuf, timebuf); |
if (l == -1 || l >= CVS_ENT_MAXLINELEN) |
if (l == -1 || l >= CVS_ENT_MAXLINELEN) |
|
|
ent = cvs_ent_open(wdir); |
ent = cvs_ent_open(wdir); |
cvs_ent_add(ent, entry); |
cvs_ent_add(ent, entry); |
cvs_ent_close(ent, ENT_SYNC); |
cvs_ent_close(ent, ENT_SYNC); |
xfree(entry); |
|
|
|
if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1) |
if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1) |
fatal("cvs_client_updated: open: %s: %s", |
fatal("cvs_client_updated: open: %s: %s", |