Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/xcvs/dist/src Allow init for new repository co...
details: https://anonhg.NetBSD.org/src/rev/7abe9aba17b4
branches: trunk
changeset: 767753:7abe9aba17b4
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 29 18:47:11 2011 +0000
description:
Allow init for new repository construction!
diffstat:
external/gpl2/xcvs/dist/src/mkmodules.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 37fa76e4fe85 -r 7abe9aba17b4 external/gpl2/xcvs/dist/src/mkmodules.c
--- a/external/gpl2/xcvs/dist/src/mkmodules.c Fri Jul 29 15:20:39 2011 +0000
+++ b/external/gpl2/xcvs/dist/src/mkmodules.c Fri Jul 29 18:47:11 2011 +0000
@@ -1154,15 +1154,12 @@
char *info_v;
/* Exit status. */
int err = 0;
+ struct stat st;
const struct admin_file *fileptr;
umask (cvsumask);
- if (!admin_group_member ())
- error (1, 0, "usage is restricted to members of the group %s",
- config->UserAdminGroup);
-
if (argc == -1 || argc > 1)
usage (init_usage);
@@ -1177,6 +1174,11 @@
}
#endif /* CLIENT_SUPPORT */
+ if (stat (current_parsed_root->directory, &st) != -1)
+ if (!admin_group_member ())
+ error (1, 0, "init to an existing repository is restricted to"
+ " members of the group %s", config->UserAdminGroup);
+
/* Note: we do *not* create parent directories as needed like the
old cvsinit.sh script did. Few utilities do that, and a
non-existent parent directory is as likely to be a typo as something
Home |
Main Index |
Thread Index |
Old Index