cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cvs-cvs] ccvs/src server.c server.h


From: Derek R. Price
Subject: Re: [Cvs-cvs] ccvs/src server.c server.h
Date: Mon, 12 Jun 2006 10:43:41 -0400
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Hyslop wrote:
> CVSROOT:    /cvsroot/cvs Module name:    ccvs Changes by:    Jim Hyslop
> <jhyslop>    06/06/12 14:33:03
>
> Modified files: src            : server.c server.h
>
> Log message: * server.c, server.h: Backing out gratuitous changes
> of previous commit
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.c?cvsroot=cvs&r1=1.466&r2=1.467
> 
> http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.h?cvsroot=cvs&r1=1.47&r2=1.48
>
>
> Patches: Index: server.c
> ===================================================================
>  RCS file: /cvsroot/cvs/ccvs/src/server.c,v retrieving revision
> 1.466 retrieving revision 1.467 diff -u -b -r1.466 -r1.467 ---
> server.c    12 Jun 2006 02:33:14 -0000    1.466 +++ server.c    12 Jun 2006
> 14:33:02 -0000    1.467 @@ -8267,15 +8267,22 @@ } }
>
> -#ifdef SERVER_SUPPORT + + /* Return whether we should send
> operations on base files.  */ bool server_use_bases (void) {
> +#ifdef SERVER_SUPPORT return supported_response ("Base-checkout");
>  +#else /* !SERVER_SUPPORT */ +    return 0; +#endif }
>
>
> + +#ifdef SERVER_SUPPORT static void server_send_signatures (struct
> file_info *finfo, const char *rev) {
>
> Index: server.h
> ===================================================================
>  RCS file: /cvsroot/cvs/ccvs/src/server.h,v retrieving revision
> 1.47 retrieving revision 1.48 diff -u -b -r1.47 -r1.48 --- server.h
> 12 Jun 2006 02:33:14 -0000    1.47 +++ server.h    12 Jun 2006 14:33:02
> -0000    1.48 @@ -254,12 +254,7 @@ void server_base_diff (struct
> file_info *finfo, const char *f1, const char *rev1, const char
> *label1, const char *f2, const char *rev2, const char *label2); -
> -#ifdef SERVER_SUPPORT bool server_use_bases (void); -#else
> -#define server_use_bases() false -#endif
>
> void cvs_output (const char *, size_t); void cvs_output_binary
> (char *, size_t);

Whoops, this doesn't bother me so much, and may be optimized by more
compilers if you could restore it (and I'd actually missed the
`#define ... false' in server.h in my first scan).  What bothered me,
really, as the exact sort of unreadable cruft I was trying to avoid by
always defining the server_uses_bases function, were these changes you
left in update.c and which should be unnecessary compiled against
either my or your version of server.[ch]:

> Index: update.c
> ===================================================================
>  RCS file: /cvsroot/cvs/ccvs/src/update.c,v retrieving revision
> 1.263 retrieving revision 1.264 diff -u -b -r1.263 -r1.264 ---
> update.c    17 May 2006 20:53:45 -0000    1.263 +++ update.c    12 Jun 2006
> 02:33:14 -0000    1.264 @@ -488,10 +488,11 @@ preload_update_dir ?
> preload_update_dir : "(null)", xdotemplate, repository ? repository
> : "(null)");
>
> +#ifdef SERVER_SUPPORT /* Set globals.  */ if (server_active &&
> server_use_bases ()) bases = true; - +#endif /* SERVER_SUPPORT */
> /* fill in the statics */ options = xoptions; tag = xtag; @@
> -2009,7 +2010,11 @@
>
> /* FIXME: the noexec case is broken.  RCS_merge could be doing the
> xcmp on the temporary files without much hassle, I think.  */ -    if
> (!noexec && !bases && !xcmp (backup, finfo->file)) +    if (!noexec &&
>  +#ifdef SERVER_SUPPORT +        !bases && +#endif /* SERVER_SUPPORT */ +
> !xcmp (backup, finfo->file)) { if (!quiet) { @@ -2027,11 +2032,13
> @@ goto out; }
>
> +#ifdef SERVER_SUPPORT if (!bases) /* The client may determine this
> is a conflict rather than * modified.  Let it write the correct
> message. */ write_letter (finfo, 'M'); +#endif /* SERVER_SUPPORT */
>  } retval = 0; out: @@ -2378,7 +2385,6 @@ server_updated (finfo,
> vers, SERVER_UPDATED, (mode_t) -1, NULL, NULL); #endif /*
> SERVER_SUPPORT */ - freevers_ts (&xvers); return; } @@ -2513,7
> +2519,11 @@ /* FIXME: It would be more consistent if the client
> printed this * message when BASES. */ -        if (!really_quiet &&
> bases) +        if (!really_quiet +#ifdef SERVER_SUPPORT +           
&& bases
> +#endif +            ) write_letter (finfo, 'M'); status = 0; } @@ -2548,6
> +2558,7 @@ */ write_letter (finfo, 'C'); } +#ifdef SERVER_SUPPORT
> else if (!bases) /* status == 0 */ { bool unchanged, isbase; @@
> -2591,6 +2602,7 @@ */ goto out; } +#endif /* SERVER_SUPPORT */
>
> /* The file has changed, but if we just checked it out it may still
> have the same timestamp it did when it was first @@ -2604,7 +2616,9
> @@ again won't cost much in that case.  */ RegisterMerge (finfo,
> vers, backup, status, false);
>
> +#ifdef SERVER_SUPPORT out: +#endif /* SERVER_SUPPORT */ free
> (rev1); free (rev2); free (backup);

Thanks again,

Derek

- --
Derek R. Price
CVS Solutions Architect
Get CVS support at Ximbiot <http://ximbiot.com>!
v: +1 248.835.1260
f: +1 248.835.1263
<mailto:address@hidden>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEjX2dLD1OTBfyMaQRAoHnAJ4n3jLnQWxln9R6GFdg56dEcU1RigCgqPvU
x+cOKozMl9YsOm0SQAjctrg=
=Pzgx
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]