Deleted Added
sdiff udiff text old ( 102843 ) new ( 107487 )
full compact
1/* JT thinks BeOS is worth the trouble. */
2
3/* CVS client-related stuff.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. */
14
15/*
16 * $FreeBSD: head/contrib/cvs/src/client.c 102843 2002-09-02 05:57:14Z peter $
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif /* HAVE_CONFIG_H */
22
23#include <assert.h>
24#include "cvs.h"

--- 221 unchanged lines hidden (view full) ---

246 files on disk. */
247 this_root = Name_Root (arg, (char *) NULL);
248 *t = c;
249 }
250 else
251 {
252 /* We're at the beginning of the string. Look at the
253 CVSADM files in cwd. */
254 this_root = Name_Root ((char *) NULL, (char *) NULL);
255 }
256
257 /* Now check the value for root. */
258 if (CVSroot_cmdline == NULL && this_root && current_parsed_root
259 && (strcmp (this_root, current_parsed_root->original) != 0))
260 {
261 /* Don't send this, since the CVSROOTs don't match. */
262 free (this_root);

--- 1056 unchanged lines hidden (view full) ---

1319 }
1320
1321 } while (dirp != NULL);
1322 free (dir);
1323 /* Now it better work. */
1324 if ( CVS_CHDIR (dir_name) < 0)
1325 error (1, errno, "could not chdir to %s", dir_name);
1326 }
1327 else if (!isdir (CVSADM))
1328 {
1329 /*
1330 * Put repository in CVS/Repository. For historical
1331 * (pre-CVS/Root) reasons, this is an absolute pathname,
1332 * but what really matters is the part of it which is
1333 * relative to cvsroot.
1334 */

--- 2273 unchanged lines hidden (view full) ---

3608 /* First we shut down TO_SERVER. That tells the server that its input is
3609 * finished. It then shuts down the buffer it is sending to us, at which
3610 * point our shut down of FROM_SERVER will complete.
3611 */
3612
3613 status = buf_shutdown (to_server);
3614 if (status != 0)
3615 error (0, status, "shutting down buffer to server");
3616 status = buf_shutdown (from_server);
3617 if (status != 0)
3618 error (0, status, "shutting down buffer from server");
3619
3620 buf_free (to_server);
3621 buf_free (from_server);
3622 server_started = 0;
3623
3624 /* see if we need to sleep before returning to avoid time-stamp races */
3625 if (last_register_time)
3626 {
3627 sleep_past (last_register_time);
3628 }
3629

--- 89 unchanged lines hidden (view full) ---

3719
3720
3721/* get the port number for a client to connect to based on the port
3722 * and method of a cvsroot_t.
3723 *
3724 * we do this here instead of in parse_cvsroot so that we can keep network
3725 * code confined to a localized area and also to delay the lookup until the
3726 * last possible moment so it remains possible to run cvs client commands that
3727 * skip opening connections to the server (i.e. skip network operations entirely)
3728 *
3729 * and yes, I know none of the the commands do that now, but here's to planning
3730 * for the future, eh? cheers.
3731 *
3732 * FIXME - We could cache the port lookup safely right now as we never change
3733 * it for a single root on the fly, but we'd have to un'const some other
3734 * functions
3735 */
3736int
3737get_cvs_port_number (root)
3738 const cvsroot_t *root;
3739{
3740
3741 if (root->port) return root->port;
3742

--- 163 unchanged lines hidden (view full) ---

3906
3907 if (verify_only)
3908 {
3909 int status;
3910
3911 status = buf_shutdown (to_server);
3912 if (status != 0)
3913 error (0, status, "shutting down buffer to server");
3914 status = buf_shutdown (from_server);
3915 if (status != 0)
3916 error (0, status, "shutting down buffer from server");
3917
3918 buf_free (to_server);
3919 buf_free (from_server);
3920
3921 /* Don't need to set server_started = 0 since we don't set it to 1
3922 * until returning from this call.
3923 */
3924 }
3925 else
3926 {
3927 *to_server_p = to_server;

--- 28 unchanged lines hidden (view full) ---

3956 */
3957 to_server = lto_server;
3958 from_server = lfrom_server;
3959
3960 /* Run the authorization mini-protocol before anything else. */
3961 if (do_gssapi)
3962 {
3963#ifdef HAVE_GSSAPI
3964 int fd = (int) lto_server->closure;
3965 struct stat s;
3966
3967 if (fstat (fd, &s) < 0 || !S_ISSOCK(s.st_mode))
3968 {
3969 error (1, 0, "gserver currently only enabled for socket connections");
3970 }
3971
3972 if (! connect_to_gserver (root, fd, hostinfo))
3973 {
3974 error (1, 0,
3975 "authorization failed: server %s rejected access to %s",

--- 1642 unchanged lines hidden (view full) ---

5618 */
5619 args.build_dirs = flags & SEND_BUILD_DIRS;
5620 args.force = flags & SEND_FORCE;
5621 args.no_contents = flags & SEND_NO_CONTENTS;
5622 args.backup_modified = flags & BACKUP_MODIFIED_FILES;
5623 err = start_recursion
5624 (send_fileproc, send_filesdoneproc,
5625 send_dirent_proc, send_dirleave_proc, (void *) &args,
5626 argc, argv, local, W_LOCAL, aflag, 0, (char *)NULL, 0);
5627 if (err)
5628 error_exit ();
5629 if (toplevel_repos == NULL)
5630 /*
5631 * This happens if we are not processing any files,
5632 * or for checkouts in directories without any existing stuff
5633 * checked out. The following assignment is correct for the
5634 * latter case; I don't think toplevel_repos matters for the

--- 308 unchanged lines hidden ---