version 1.1, 2004/07/13 22:02:40 |
version 1.2, 2004/07/29 18:34:23 |
|
|
|
|
extern char *__progname; |
extern char *__progname; |
|
|
extern struct cvsroot *cvs_root; |
|
|
|
|
|
/* |
/* |
* cvs_history() |
* cvs_history() |
* |
* |
* Handle the `cvs history' command. |
* Handle the `cvs history' command. |
*/ |
*/ |
|
|
|
|
int |
int |
cvs_history(int argc, char **argv) |
cvs_history(int argc, char **argv) |
{ |
{ |
|
|
u_int nbmod, rep; |
u_int nbmod, rep; |
char *user, *zone, *tag, *cp; |
char *user, *zone, *tag, *cp; |
char *modules[CVS_HISTORY_MAXMOD], histpath[MAXPATHLEN]; |
char *modules[CVS_HISTORY_MAXMOD], histpath[MAXPATHLEN]; |
|
struct cvsroot *root; |
struct cvs_hent *hent; |
struct cvs_hent *hent; |
CVSHIST *hp; |
CVSHIST *hp; |
|
|
|
|
else if (rep == 0) |
else if (rep == 0) |
flags |= CVS_HF_O; /* use -o as default */ |
flags |= CVS_HF_O; /* use -o as default */ |
|
|
if (cvs_root->cr_method == CVS_METHOD_LOCAL) { |
root = cvsroot_get("."); |
snprintf(histpath, sizeof(histpath), "%s/%s", cvs_root->cr_dir, |
if (root->cr_method == CVS_METHOD_LOCAL) { |
|
snprintf(histpath, sizeof(histpath), "%s/%s", root->cr_dir, |
CVS_PATH_HISTORY); |
CVS_PATH_HISTORY); |
hp = cvs_hist_open(histpath); |
hp = cvs_hist_open(histpath); |
if (hp == NULL) { |
if (hp == NULL) { |