version 1.24, 2005/05/11 22:50:09 |
version 1.25, 2005/05/19 15:37:50 |
|
|
#define CVS_GETLOG_REVEND \ |
#define CVS_GETLOG_REVEND \ |
"=============================================================================" |
"=============================================================================" |
|
|
static int cvs_getlog_remote (CVSFILE *, void *); |
static int cvs_getlog_remote (CVSFILE *, void *); |
static int cvs_getlog_local (CVSFILE *, void *); |
static int cvs_getlog_local (CVSFILE *, void *); |
|
static int cvs_getlog_options(char *, int, char **, int *); |
|
static int cvs_getlog_sendflags(struct cvsroot *); |
|
|
int cvs_getlog_options(char *, int, char **, int *); |
|
|
|
struct cvs_cmd_info cvs_getlog = { |
struct cvs_cmd_info cvs_getlog = { |
cvs_getlog_options, |
cvs_getlog_options, |
NULL, |
cvs_getlog_sendflags, |
cvs_getlog_remote, |
cvs_getlog_remote, |
NULL, NULL, |
NULL, NULL, |
CF_IGNORE | CF_RECURSE, |
CF_IGNORE | CF_RECURSE, |
|
|
|
|
static int log_rfonly = 0; |
static int log_rfonly = 0; |
static int log_honly = 0; |
static int log_honly = 0; |
|
static int log_lhonly = 0; |
static int log_notags = 0; |
static int log_notags = 0; |
|
|
int |
static int |
cvs_getlog_options(char *opt, int argc, char **argv, int *arg) |
cvs_getlog_options(char *opt, int argc, char **argv, int *arg) |
{ |
{ |
int ch; |
int ch; |
|
|
while ((ch = getopt(argc, argv, opt)) != -1) { |
while ((ch = getopt(argc, argv, opt)) != -1) { |
switch (ch) { |
switch (ch) { |
|
case 'b': |
|
break; |
case 'd': |
case 'd': |
break; |
break; |
case 'h': |
case 'h': |
|
|
break; |
break; |
case 'r': |
case 'r': |
break; |
break; |
|
case 's': |
|
break; |
|
case 't': |
|
log_lhonly = 1; |
|
break; |
|
case 'w': |
|
break; |
default: |
default: |
return (CVS_EX_USAGE); |
return (CVS_EX_USAGE); |
} |
} |
|
|
return (0); |
return (0); |
} |
} |
|
|
|
static int |
|
cvs_getlog_sendflags(struct cvsroot *root) |
|
{ |
|
if (log_honly && (cvs_sendarg(root, "-h", 0) < 0)) |
|
return (CVS_EX_PROTO); |
|
if (log_notags && (cvs_sendarg(root, "-N", 0) < 0)) |
|
return (CVS_EX_PROTO); |
|
if (log_rfonly && (cvs_sendarg(root, "-R", 0) < 0)) |
|
return (CVS_EX_PROTO); |
|
if (log_lhonly && (cvs_sendarg(root, "-t", 0) < 0)) |
|
return (CVS_EX_PROTO); |
|
|
|
return (0); |
|
} |
|
|
/* |
/* |
* cvs_getlog_remote() |
* cvs_getlog_remote() |