version 1.12, 2004/08/12 17:51:05 |
version 1.13, 2004/11/09 21:01:36 |
|
|
char *cvs_rsh = CVS_RSH_DEFAULT; |
char *cvs_rsh = CVS_RSH_DEFAULT; |
char *cvs_editor = CVS_EDITOR_DEFAULT; |
char *cvs_editor = CVS_EDITOR_DEFAULT; |
|
|
|
char *cvs_msg = NULL; |
|
|
|
|
/* hierarchy of all the files affected by the command */ |
/* hierarchy of all the files affected by the command */ |
CVSFILE *cvs_files; |
CVSFILE *cvs_files; |
|
|
|
|
char cmd_alias[CVS_CMD_MAXALIAS][CVS_CMD_MAXNAMELEN]; |
char cmd_alias[CVS_CMD_MAXALIAS][CVS_CMD_MAXNAMELEN]; |
int (*cmd_hdlr)(int, char **); |
int (*cmd_hdlr)(int, char **); |
char *cmd_synopsis; |
char *cmd_synopsis; |
|
char *cmd_opts; |
char cmd_descr[CVS_CMD_MAXDESCRLEN]; |
char cmd_descr[CVS_CMD_MAXDESCRLEN]; |
} cvs_cdt[] = { |
} cvs_cdt[] = { |
{ |
{ |
CVS_OP_ADD, "add", { "ad", "new" }, cvs_add, |
CVS_OP_ADD, "add", { "ad", "new" }, cvs_add, |
"[-m msg] file ...", |
"[-m msg] file ...", |
|
"", |
"Add a new file/directory to the repository", |
"Add a new file/directory to the repository", |
}, |
}, |
{ |
{ |
-1, "admin", { "adm", "rcs" }, NULL, |
-1, "admin", { "adm", "rcs" }, NULL, |
"", |
"", |
|
"", |
"Administration front end for rcs", |
"Administration front end for rcs", |
}, |
}, |
{ |
{ |
CVS_OP_ANNOTATE, "annotate", { "ann" }, NULL, |
CVS_OP_ANNOTATE, "annotate", { "ann" }, NULL, |
"", |
"", |
|
"", |
"Show last revision where each line was modified", |
"Show last revision where each line was modified", |
}, |
}, |
{ |
{ |
CVS_OP_CHECKOUT, "checkout", { "co", "get" }, cvs_checkout, |
CVS_OP_CHECKOUT, "checkout", { "co", "get" }, cvs_checkout, |
"", |
"", |
|
"", |
"Checkout sources for editing", |
"Checkout sources for editing", |
}, |
}, |
{ |
{ |
CVS_OP_COMMIT, "commit", { "ci", "com" }, cvs_commit, |
CVS_OP_COMMIT, "commit", { "ci", "com" }, cvs_commit, |
"[-flR] [-F logfile | -m msg] [-r rev] ...", |
"[-flR] [-F logfile | -m msg] [-r rev] ...", |
|
"F:flm:Rr:", |
"Check files into the repository", |
"Check files into the repository", |
}, |
}, |
{ |
{ |
CVS_OP_DIFF, "diff", { "di", "dif" }, cvs_diff, |
CVS_OP_DIFF, "diff", { "di", "dif" }, cvs_diff, |
"[-cilu] [-D date] [-r rev] ...", |
"[-cilu] [-D date] [-r rev] ...", |
|
"cD:ilur:", |
"Show differences between revisions", |
"Show differences between revisions", |
}, |
}, |
{ |
{ |
-1, "edit", { }, NULL, |
-1, "edit", { }, NULL, |
"", |
"", |
|
"", |
"Get ready to edit a watched file", |
"Get ready to edit a watched file", |
}, |
}, |
{ |
{ |
-1, "editors", { }, NULL, |
-1, "editors", { }, NULL, |
"", |
"", |
|
"", |
"See who is editing a watched file", |
"See who is editing a watched file", |
}, |
}, |
{ |
{ |
-1, "export", { "ex", "exp" }, NULL, |
-1, "export", { "ex", "exp" }, NULL, |
"", |
"", |
|
"", |
"Export sources from CVS, similar to checkout", |
"Export sources from CVS, similar to checkout", |
}, |
}, |
{ |
{ |
CVS_OP_HISTORY, "history", { "hi", "his" }, cvs_history, |
CVS_OP_HISTORY, "history", { "hi", "his" }, cvs_history, |
"", |
"", |
|
"", |
"Show repository access history", |
"Show repository access history", |
}, |
}, |
{ |
{ |
CVS_OP_IMPORT, "import", { "im", "imp" }, NULL, |
CVS_OP_IMPORT, "import", { "im", "imp" }, cvs_import, |
"", |
"[-d] [-b branch] [-I ign] [-k subst] [-m msg] " |
|
"repository vendor-tag release-tags ...", |
|
"b:dI:k:m:", |
"Import sources into CVS, using vendor branches", |
"Import sources into CVS, using vendor branches", |
}, |
}, |
{ |
{ |
CVS_OP_INIT, "init", { }, cvs_init, |
CVS_OP_INIT, "init", { }, cvs_init, |
"", |
"", |
|
"", |
"Create a CVS repository if it doesn't exist", |
"Create a CVS repository if it doesn't exist", |
}, |
}, |
#if defined(HAVE_KERBEROS) |
#if defined(HAVE_KERBEROS) |
{ |
{ |
"kserver", {}, NULL |
"kserver", {}, NULL |
"", |
"", |
|
"", |
"Start a Kerberos authentication CVS server", |
"Start a Kerberos authentication CVS server", |
}, |
}, |
#endif |
#endif |
{ |
{ |
CVS_OP_LOG, "log", { "lo" }, cvs_getlog, |
CVS_OP_LOG, "log", { "lo" }, cvs_getlog, |
"", |
"", |
|
"", |
"Print out history information for files", |
"Print out history information for files", |
}, |
}, |
{ |
{ |
-1, "login", {}, NULL, |
-1, "login", {}, NULL, |
"", |
"", |
|
"", |
"Prompt for password for authenticating server", |
"Prompt for password for authenticating server", |
}, |
}, |
{ |
{ |
-1, "logout", {}, NULL, |
-1, "logout", {}, NULL, |
"", |
"", |
|
"", |
"Removes entry in .cvspass for remote repository", |
"Removes entry in .cvspass for remote repository", |
}, |
}, |
{ |
{ |
-1, "rdiff", {}, NULL, |
-1, "rdiff", {}, NULL, |
"", |
"", |
|
"", |
"Create 'patch' format diffs between releases", |
"Create 'patch' format diffs between releases", |
}, |
}, |
{ |
{ |
-1, "release", {}, NULL, |
-1, "release", {}, NULL, |
"", |
"", |
|
"", |
"Indicate that a Module is no longer in use", |
"Indicate that a Module is no longer in use", |
}, |
}, |
{ |
{ |
CVS_OP_REMOVE, "remove", {}, NULL, |
CVS_OP_REMOVE, "remove", {}, NULL, |
"", |
"", |
|
"", |
"Remove an entry from the repository", |
"Remove an entry from the repository", |
}, |
}, |
{ |
{ |
-1, "rlog", {}, NULL, |
-1, "rlog", {}, NULL, |
"", |
"", |
|
"", |
"Print out history information for a module", |
"Print out history information for a module", |
}, |
}, |
{ |
{ |
-1, "rtag", {}, NULL, |
-1, "rtag", {}, NULL, |
"", |
"", |
|
"", |
"Add a symbolic tag to a module", |
"Add a symbolic tag to a module", |
}, |
}, |
{ |
{ |
CVS_OP_SERVER, "server", {}, cvs_server, |
CVS_OP_SERVER, "server", {}, cvs_server, |
"", |
"", |
|
"", |
"Server mode", |
"Server mode", |
}, |
}, |
{ |
{ |
CVS_OP_STATUS, "status", {}, cvs_status, |
CVS_OP_STATUS, "status", {}, cvs_status, |
"", |
"", |
|
"", |
"Display status information on checked out files", |
"Display status information on checked out files", |
}, |
}, |
{ |
{ |
CVS_OP_TAG, "tag", { "ta", }, NULL, |
CVS_OP_TAG, "tag", { "ta", }, NULL, |
"", |
"", |
|
"", |
"Add a symbolic tag to checked out version of files", |
"Add a symbolic tag to checked out version of files", |
}, |
}, |
{ |
{ |
-1, "unedit", {}, NULL, |
-1, "unedit", {}, NULL, |
"", |
"", |
|
"", |
"Undo an edit command", |
"Undo an edit command", |
}, |
}, |
{ |
{ |
CVS_OP_UPDATE, "update", {}, cvs_update, |
CVS_OP_UPDATE, "update", {}, cvs_update, |
"", |
"", |
|
"", |
"Bring work tree in sync with repository", |
"Bring work tree in sync with repository", |
}, |
}, |
{ |
{ |
CVS_OP_VERSION, "version", {}, cvs_version, |
CVS_OP_VERSION, "version", {}, cvs_version, |
"", |
"", "", |
"Show current CVS version(s)", |
"Show current CVS version(s)", |
}, |
}, |
{ |
{ |
-1, "watch", {}, NULL, |
-1, "watch", {}, NULL, |
"", |
"", |
|
"", |
"Set watches", |
"Set watches", |
}, |
}, |
{ |
{ |
-1, "watchers", {}, NULL, |
-1, "watchers", {}, NULL, |
"", |
"", |
|
"", |
"See who is watching a file", |
"See who is watching a file", |
}, |
}, |
}; |
}; |
|
|
struct cvs_cmd* cvs_findcmd (const char *); |
struct cvs_cmd* cvs_findcmd (const char *); |
|
|
|
|
|
|
/* |
/* |
* sigchld_hdlr() |
|
* |
|
* Handler for the SIGCHLD signal, which can be received in case we are |
|
* running a remote server and it dies. |
|
*/ |
|
|
|
void |
|
sigchld_hdlr(int signo) |
|
{ |
|
int status; |
|
pid_t pid; |
|
|
|
if ((pid = wait(&status)) == -1) { |
|
} |
|
} |
|
|
|
|
|
/* |
|
* usage() |
* usage() |
* |
* |
* Display usage information. |
* Display usage information. |
|
|
} |
} |
|
|
/* setup signal handlers */ |
/* setup signal handlers */ |
signal(SIGCHLD, sigchld_hdlr); |
signal(SIGPIPE, SIG_IGN); |
|
|
cvs_file_init(); |
cvs_file_init(); |
|
|