? fix-default_fileattrs.diff
? vms/Makefile
Index: src/ChangeLog
===================================================================
RCS file: /home/nyap/.cvsroot/cvs/src/ChangeLog,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -C16 -w -r1.1.1.1 -r1.1.1.1.14.1
*** src/ChangeLog	2001/03/06 16:21:21	1.1.1.1
--- src/ChangeLog	2001/03/08 20:22:49	1.1.1.1.14.1
***************
*** 1,16 ****
--- 1,21 ----
+ 2001-03-08  Noel Yap  <yap_noel@yahoo.com>
+ 
+ 	* checkin.c (Checkin):
+ 	Default fileattr set on newly added files.
+ 
  2000-09-19  Larry Jones  <larry.jones@sdrc.com>
  
  	* version.c: Version 1.11.
  
  2000-09-07  Larry Jones  <larry.jones@sdrc.com>
  
  	* Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
  	from autoconf.
  
  2000-08-23  Larry Jones  <larry.jones@sdrc.com>
  
  	* mkmodules.c (init): Create an empty val-tags file if it doesn't
  	already exist to avoid problems with users not having sufficient
  	permissions to create it later.
  
  2000-09-06  Jim Kingdon  <jkingdon@dhcp-net200-89.su.valinux.com>
Index: src/checkin.c
===================================================================
RCS file: /home/nyap/.cvsroot/cvs/src/checkin.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -C16 -w -r1.1.1.1 -r1.1.1.1.14.1
*** src/checkin.c	2001/03/06 16:21:21	1.1.1.1
--- src/checkin.c	2001/03/08 20:22:49	1.1.1.1.14.1
***************
*** 105,136 ****
--- 105,148 ----
  
  	    /*
  	     * If we want read-only files, muck the permissions here, before
  	     * getting the file time-stamp.
  	     */
  	    if (!cvswrite || fileattr_get (finfo->file, "_watched"))
  		xchmod (finfo->file, 0);
  
  	    /* Re-register with the new data.  */
  	    vers = Version_TS (finfo, NULL, tag, NULL, 1, set_time);
  	    if (strcmp (vers->options, "-V4") == 0)
  		vers->options[0] = '\0';
  	    Register (finfo->entries, finfo->file, vers->vn_rcs, vers->ts_user,
  		      vers->options, vers->tag, vers->date, (char *) 0);
  	    history_write (type, NULL, vers->vn_rcs,
  			   finfo->file, finfo->repository);
+ 
+             if (type == 'A')
+             {
+                 char *attr = NULL;
+ 
+                 attr = fileattr_getall (NULL);
+                 if (attr != NULL)
+                 {
+                     fileattr_setall (finfo->file, attr);
+                     free (attr);
+                 }
+             }
  
  	    if (tocvsPath)
  		if (unlink_file_dir (tocvsPath) < 0)
  		    error (0, errno, "cannot remove %s", tocvsPath);
  
  	    break;
  
  	case -1:			/* fork failed */
  	    if (tocvsPath)
  		if (unlink_file_dir (tocvsPath) < 0)
  		    error (0, errno, "cannot remove %s", tocvsPath);
  
  	    if (!noexec)
  		error (1, errno, "could not check in %s -- fork failed",
  		       finfo->fullname);
  	    return (1);
Index: src/version.c
===================================================================
RCS file: /home/nyap/.cvsroot/cvs/src/version.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -C16 -w -r1.1.1.1 -r1.1.1.1.14.1
*** src/version.c	2001/03/06 16:21:21	1.1.1.1
--- src/version.c	2001/03/08 20:22:50	1.1.1.1.14.1
***************
*** 1,31 ****
  /*
   * Copyright (c) 1994 david d `zoo' zuhn
   * Copyright (c) 1994 Free Software Foundation, Inc.
   * Copyright (c) 1992, Brian Berliner and Jeff Polk
   * Copyright (c) 1989-1992, Brian Berliner
   * 
   * You may distribute under the terms of the GNU General Public License as
   * specified in the README file that comes with this  CVS source distribution.
   * 
   * version.c - the CVS version number
   */
  
  #include "cvs.h"
  
! char *version_string = "Concurrent Versions System (CVS) 1.11";
  
  #ifdef CLIENT_SUPPORT
  #ifdef SERVER_SUPPORT
  char *config_string = " (client/server)\n";
  #else
  char *config_string = " (client)\n";
  #endif
  #else
  #ifdef SERVER_SUPPORT
  char *config_string = " (server)\n";
  #else
  char *config_string = "\n";
  #endif
  #endif
  
  static const char *const version_usage[] =
--- 1,31 ----
  /*
   * Copyright (c) 1994 david d `zoo' zuhn
   * Copyright (c) 1994 Free Software Foundation, Inc.
   * Copyright (c) 1992, Brian Berliner and Jeff Polk
   * Copyright (c) 1989-1992, Brian Berliner
   *
   * You may distribute under the terms of the GNU General Public License as
   * specified in the README file that comes with this  CVS source distribution.
   *
   * version.c - the CVS version number
   */
  
  #include "cvs.h"
  
! char *version_string = "Concurrent Versions System (CVS) 1.11 (default fileattrs)";
  
  #ifdef CLIENT_SUPPORT
  #ifdef SERVER_SUPPORT
  char *config_string = " (client/server)\n";
  #else
  char *config_string = " (client)\n";
  #endif
  #else
  #ifdef SERVER_SUPPORT
  char *config_string = " (server)\n";
  #else
  char *config_string = "\n";
  #endif
  #endif
  
  static const char *const version_usage[] =
***************
*** 59,75 ****
      if (client_active)
      {
  	(void) fputs ("Server: ", stdout);
  	start_server ();
  	if (supported_request ("version"))
  	    send_to_server ("version\012", 0);
  	else
  	{
  	    send_to_server ("noop\012", 0);
  	    fputs ("(unknown)\n", stdout);
  	}
  	err = get_responses_and_close ();
      }
  #endif
      return err;
  }
- 	
--- 59,74 ----
