diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-10 11:25:28 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-10 11:25:28 +0000 |
commit | 849c1bd52a195d200c06ca45b0e5172a4d79a054 (patch) | |
tree | f332e8fc21bd9a59369fcf30aab38d18f6767472 /usr.bin/cvs | |
parent | dad61aa7d10881ed178ef770cd00cdabb02ce4d7 (diff) |
Synced rlog's usage checks and with rtag. Also unbreaks rtag and rlog with
GNU cvs on server-side.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/getlog.c | 28 | ||||
-rw-r--r-- | usr.bin/cvs/tag.c | 4 |
2 files changed, 22 insertions, 10 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 9834fec37a5..d99f5eb4c2a 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.78 2007/09/24 22:06:28 joris Exp $ */ +/* $OpenBSD: getlog.c,v 1.79 2008/01/10 11:25:27 tobias Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * Copyright (c) 2006 Joris Vink <joris@openbsd.org> @@ -62,8 +62,7 @@ struct cvs_cmd cvs_cmd_rlog = { int cvs_getlog(int argc, char **argv) { - int ch; - int flags; + int ch, flags, i; char *arg = "."; struct cvs_recursion cr; @@ -105,6 +104,16 @@ cvs_getlog(int argc, char **argv) argc -= optind; argv += optind; + if (cvs_cmdop == CVS_OP_RLOG) { + if (argc == 0) + return 0; + + for (i = 0; i < argc; i++) + if (argv[i][0] == '/') + fatal("Absolute path name is invalid: %s", + argv[i]); + } + cr.enterdir = NULL; cr.leavedir = NULL; @@ -145,10 +154,13 @@ cvs_getlog(int argc, char **argv) cr.flags = flags; - if (argc > 0) - cvs_file_run(argc, argv, &cr); - else - cvs_file_run(1, &arg, &cr); + if (cvs_cmdop == CVS_OP_LOG || + current_cvsroot->cr_method == CVS_METHOD_LOCAL) { + if (argc > 0) + cvs_file_run(argc, argv, &cr); + else + cvs_file_run(1, &arg, &cr); + } if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { cvs_client_send_files(argv, argc); @@ -178,7 +190,7 @@ cvs_log_local(struct cvs_file *cf) cvs_file_classify(cf, cvs_directory_tag); if (cf->file_status == FILE_UNKNOWN) { - if (verbosity > 0) + if (verbosity > 0 && cvs_cmdop != CVS_OP_RLOG) cvs_log(LP_ERR, "nothing known about %s", cf->file_path); return; diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c index 5c8de022fb7..048a88cd009 100644 --- a/usr.bin/cvs/tag.c +++ b/usr.bin/cvs/tag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tag.c,v 1.60 2008/01/10 11:20:29 tobias Exp $ */ +/* $OpenBSD: tag.c,v 1.61 2008/01/10 11:25:27 tobias Exp $ */ /* * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -173,7 +173,7 @@ cvs_tag(int argc, char **argv) cr.flags = flags; if (cvs_cmdop == CVS_OP_TAG || - current_cvsroot->cr_method == CVS_METHOD_LOCAL)) { + current_cvsroot->cr_method == CVS_METHOD_LOCAL) { if (argc > 0) cvs_file_run(argc, argv, &cr); else |