Re: CVS on VMS mailing list ?

2002-01-07 Thread Patrick Spinler


I posted a patch against 1.11 for the VMS rename command to cvs-bugs a month or two 
ago.  My message got no response whatever, so I'm not certain where to take it from 
here.

The issue I found is that when using a repository with "watch on", CVS will not update 
any changed files, since the files in the local repository are read only.  My patch 
just turns on write permission before the new file is "rename()"ed onto the existing
file name, then replaces the original permissions.

(Searching my sent mail folder ...)

Here.

-- Pat

--- cvs-original/cvs-1_11/src/filesubr.cTue Jul 11 15:32:02 2000
+++ cvs-1_11/src/filesubr.c Mon Dec  3 09:24:28 2001
@@ -395,14 +395,25 @@
 const char *from;
 const char *to;
 {
+int change_to_read = 0;
+
 if (trace)
(void) fprintf (stderr, "%s-> rename(%s,%s)\n",
CLIENT_SERVER_STR, from, to);
 if (noexec)
return;

+if (ifaccessible (to, F_OK) && ! isaccessible (to, W_OK))
+   {
+   xchmod (to, 1);
+   change_to_read = 1;
+   }
+
 if (rename (from, to) < 0)
error (1, errno, "cannot rename file %s to %s", from, to);
+
+if (change_to_read);
+   xchmod (to, 0);
 }

 /*



Miller Dale Contractor HQ AFWA wrote:
> 
> Greetings:
> 
> I would be interested in a VMS CVS group.
> 
> Here is some background on what I am doing.  I use CVS 1.11.1p1 on all
> platforms.  I have CVS client running on DEC OpenVMS V7.2-1.  I use pserver.
> I have CVS running on DEC ALPHA running OSF1 V4.0, SGI running IRIX64 6.5,
> and IBM AIX. I have CVS repositories on OSF1 and IRIX64.  The VMS CVS client
> is using the OSF1 CVS server.
> 
> I use CMS on some VMS processors, however, a recent project did not purchase
> CMS so I am using CVS.
> 
> I have extensive work with SCCS, RCS, CMVision, CMS, and CVS.  I have
> converted all our CMVision projects to CVS.  I greatly prefer UNIX over VMS.
> However, I have one VMS project using CVS.
> 
> Current problems I have encountered with the VMS CVS port include:
> 
> cvs export and checkout error off after handling about 250 files and
> directories.
> A work around is to repeat the command until all files are processed.  I
> believe this has been explained to be a problem with the VMS rename program.
> I would be interested in a fix for this.
> 
> I learned that a module name cannot start with "d" or "D".  For example, I
> did an import creating a repository with a module name of dips (a Government
> acronym).  The import ran great.  I could do rlog and rannotate commands
> without any problems.  But if I tried to do a checkout or export I got a
> "could not chdir" error.
> 
> DIPSD->cvs checkout dips/ssies_gdas/apga/apga.for
> cvs [checkout aborted]: could not chdir to dips/ssies_gdas/apga: invalid
> argument
> 
> This was strange because I have other modules that work fine.  I finally
> renamed the module and the "could not chdir" problem vanished.
> 
> On the server side, I did a "mv $CVSROOT/dips $CVSROOT/vms_dips" and now
> checkout and export both work.
> 
> I believe CVS might be seeing the starting d in the module name as a "d"
> option on the checkout and export command.  If this is true there may be
> other options on other cvs commands that could present a problem.
> 
> Please let me know if a VMS group is formed.
> 
> Thanks, Dale Miller
> 
> -Original Message-
> From: Patrick Spinler [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 01, 2001 11:36 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: CVS on VMS mailing list ?
> 
> Folks:
> 
> I'm writing you this because I see from browsing info-cvs and bug-cvs
> that you are all developing or using cvs client on VMS, with varying
> degrees of success.
> 
> Recently I have started doing the same, using CVS 1.11 (?p1? - sorry
> I'm at home right now & my VMS box is at work) with patches obtained
> from the net.  Would you be interested in forming a CVS on VMS mailing
> list to discuss issues surrounding this port ?  If mail.gnu.org can't
> provide such, I could.
> 
> Please let me know if you're interested in a vms specific forum for
> discussions of CVS.
> 
> Thanks,
> -- Pat
> 
> p.s.  are patches better sent to info-cvs, bug-cvs or some other place ?
> p.p.s.  which forum to ask questions about flow of control & logic in
> the code ?

-- 
  This message does not represent the policies or positions
 of the Mayo Foundation or its subsidiaries.
  Patrick Spinler   email:  [EMAIL PROTECTED]
  Mayo Foundation   phone:  507/284-9485

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs



Re: rename bug on OpenVMS - Patch

2001-12-03 Thread Patrick Spinler

Patrick Spinler wrote:
> 
> All:
> 
> On OpenVMS if you try to call the C runtime library "rename" function
> where the target file already exists and has only read privileges, the
> rename call with error.
> 
> This happens in CVS if you've set your repository to strict locking
> (admin -L), user 1 commits a file, and user 2 does a "cvs update".

    - I mean "cvs watch on".  Sorry. :-(

-- Pat

-- 
  This message does not represent the policies or positions
     of the Mayo Foundation or its subsidiaries.
  Patrick Spinler   email:  [EMAIL PROTECTED]
  Mayo Foundation   phone:  507/284-9485

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs



rename bug on OpenVMS - Patch

2001-12-03 Thread Patrick Spinler


All:

On OpenVMS if you try to call the C runtime library "rename" function
where the target file already exists and has only read privileges, the
rename call with error.

This happens in CVS if you've set your repository to strict locking
(admin -L), user 1 commits a file, and user 2 does a "cvs update".

The following patch (against cvs 1.11) works around this issue.  

Comments please ?

--- cvs-original/cvs-1_11/src/filesubr.cTue Jul 11 15:32:02 2000
+++ cvs-1_11/src/filesubr.c Mon Dec  3 09:24:28 2001
@@ -395,14 +395,25 @@
 const char *from;
 const char *to;
 {
+int change_to_read = 0;
+
 if (trace)
(void) fprintf (stderr, "%s-> rename(%s,%s)\n",
CLIENT_SERVER_STR, from, to);
 if (noexec)
return;

+if (ifaccessible (to, F_OK) && ! isaccessible (to, W_OK))
+   {
+   xchmod (to, 1);
+   change_to_read = 1;
+   }
+
 if (rename (from, to) < 0)
error (1, errno, "cannot rename file %s to %s", from, to);
+
+if (change_to_read);
+   xchmod (to, 0);
 }

 /*


-- 
  This message does not represent the policies or positions
     of the Mayo Foundation or its subsidiaries.
  Patrick Spinler   email:  [EMAIL PROTECTED]
  Mayo Foundation   phone:  507/284-9485

___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs