commitinfo can't open file being committed

2003-10-24 Thread Beachey, Kendric
I'm starting to do some messing around with commitinfo.  My intent is to
write a perl script that examines the file being committed (which will be
html), noting whether it contains character references (e.g.
ampersand-pound-153-semicolon).  It will suggest changing these to entity
references (e.g. ampersand-trade-semicolon), both in the commit output and
in an email if I can swing that.

Anyway, I've got a simple script going:  (feel free to belittle or suggest
improvements)

---8--cut here--8-
#!/usr/bin/perl
$message = commitinfo test\n\n;
$send_mail = 0;

foreach $i (0..$#ARGV)
{
$message .= arg $i = $ARGV[$i]\n;
}

$filespec = $ARGV[0] . / . $ARGV[1];
$message .= \n\nfilespec = $filespec\n;

print $message;

open (INPUT, $filespec) || die (Could not open file $filespec : $!\n);

while (INPUT)
{
chop;
$line = $_;
if ($line =~ /hey/)
{
$send_mail = 1;
$blurb = Line $. = $_\n;
$message .= $blurb;
print $blurb;
}
}

close (INPUT);

$message .= \ntest done\n;

print $message;

if ($send_mail == 1)
{
`/bin/echo $message| /bin/mail [EMAIL PROTECTED];
}
---8--cut here--8-


...and I've got commitinfo running this script successfully.  The typical
output is something along these lines:


---8--cut here--8-
[EMAIL PROTECTED] dev_testing]$ echo hey  kendrics.commitinfo.test
[EMAIL PROTECTED] dev_testing]$ cvs commit -m more testing
cvs commit: Examining .
commitinfo test

arg 0 = /cvs/internet/docs/dev_testing
arg 1 = kendrics.commitinfo.test


filespec = /cvs/internet/docs/dev_testing/kendrics.commitinfo.test
Could not open file /cvs/internet/docs/dev_testing/kendrics.commitinfo.test
: No such file or directory
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!
[EMAIL PROTECTED] dev_testing]$
---8--cut here--8-


From reading Karl Fogel's book on CVS, I am led to believe the file I am
committing should exist temporarily in the repository so that the script can
open it up and read it.  But it appears this is not happening.  Am I
completely misunderstanding what I should be doing, or is something actually
wrong with the repository config?

--
Kendric Beachey


- 
This e-mail and any attachments may contain confidential material for the sole use of 
the intended recipient.  If you are not the intended recipient, please be aware that 
any disclosure, copying, distribution or use of this e-mail or any attachment is 
prohibited.  If you have received this e-mail in error, please contact the sender and 
delete all copies. 
Thank you for your cooperation 



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


RE: commitinfo can't open file being committed

2003-10-24 Thread Beachey, Kendric
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Beachey, Kendric writes:
  
  From reading Karl Fogel's book on CVS, I am led to believe 
 the file I am
  committing should exist temporarily in the repository so 
 that the script can
  open it up and read it.  But it appears this is not happening.  Am I
  completely misunderstanding what I should be doing, or is 
 something actually
  wrong with the repository config?
 
 You're misunderstanding it.  The files you're committing exist in the
 script's current working directory, not the repository.

Thanks Larry.  Just using $ARGV[1] and ignoring $ARGV[0] did the trick.
--
Kendric


- 
This e-mail and any attachments may contain confidential material for the sole use of 
the intended recipient.  If you are not the intended recipient, please be aware that 
any disclosure, copying, distribution or use of this e-mail or any attachment is 
prohibited.  If you have received this e-mail in error, please contact the sender and 
delete all copies. 
Thank you for your cooperation 



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


RE: Panic error code -39?

2003-01-22 Thread Beachey, Kendric
From: Riechers, Matthew W [mailto:[EMAIL PROTECTED]]
 Prem Prakash Pathak wrote:
  
  We have CVSServer version:1.11.1p1(client-server) setup 
 under Linux, and are
  accessing CVSServer Repository from both MacOS 9/X  
 WIndows over the
  network.
  1. MacCVS Client 10.2
  2. WinCVS Client 1.2
  Accessing thru Win client is fine. Today we got strange 
 behaviour while
  accessing thru Mac Client.
  
  It's giving following ERROR:
  cvs [checkout aborted]: Internal error: 
 cvs_hqx.cpp, 635: Panic
  Error (-39)
  Sometimes it's giving:
  cvs [checkout aborted]: Internal error: 
 cvs_hqx.cpp, 635: Unknown
  Error (-39)
 
 This is a MacCVS error. Posting an execution trace of the server may
 help pinpoint where the client is getting lost, but the MacCVS
 developers would be the best people to figure out the client problems.

I've got my Maccies using MacCVS Pro (despite the name, a completely
different client from MacCVS).  They occasionally get some weird error with
a negative number, although I think theirs are usually in the fifties.  Same
result, though:  we don't have any idea what is really wrong.

The solution I give them always works:  delete the offending section of your
working copy (which sometimes means the whole thing) and do an update to
pull a fresh copy.
--
Kendric Beachey





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



RE: PROPOSAL: Addressing the list's spam issue: was: [GB2312] ±ÜÃâåeÎóµÄÍâÙQÐÐäN·½Ê

2002-04-08 Thread Beachey, Kendric

R P Herrold said:
 Proposal: I propose to undertake to offer to moderate. If so
 designated, in moderating, my moderation will initially
 consist of turning on the option to catch and hold, pending
 discard, all non-subscriber posts.  I seek to manage held 
 posts at least daily, often a couple times during the day (a 
 subscriber's posts would continue to go straight thru ...)
 
 All HTML, non-English (within the bounds of non-English
 speakers' good faith efforts), and spam will be silently
 discarded.  Posters who post non-conformant meeting the
 foregoing criteria will be silently unsubscribed.

I vote in favor this proposal, with a slight reservation about automatic
disqualification of HTML messages.

Were it up to me, every message I ever write would be in plain old text, but
our dad-blamed Exchange server insists on HTML-ifying my messages as it
hands them to the outside world.  

There is one way around this, which is to set the properties on the message
to use UUENCODE for attachments instead of the default method (MIME, I
think), even if there are no attachments.

But there isn't a way (that I have found) to do this globally.  I have to do
it for EVERY stinkin' message I send.  And occasionally I forget to do one.
(I darn near forgot to do THIS message!)

My two cents.
--
Kendric Beachey

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



RE: reverting changes

2002-02-08 Thread Beachey, Kendric

Arcin Bozkurt writes:
 The latest change to our repository was to commit some tens 
 of files which 
 caused the code to break. I am trying to get back to the 
 state a day ago and 
 commit it back to the repository effectively overriding the 
 change made 
 (obviously this development had to be done on a branch but )
 
 I cannot use update -D yesterday, because the result is 
 sticky. removing the 
 stickiness with -A takes me back to what the repository has.

Just do your update -D yesterday with the -p option, which merely prints
the yesterday file to stdout and does not cause stickiness.  Redirect stdout
to the desired filename, and presto, you have a backdated, yet non-sticky,
copy of the file.  You can commit this file to the repository, which will
make it the new HEAD version.

i.e.

cvs up -p -D yesterday myfile.c  myfile.c
cvs commit -m Backdated to earlier version myfile.c

You can multiply this effect over your tens of files by the use of some only
slightly clever shell scripting.
--
Kendric Beachey

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



How properly to RTFM (was RE: Sendng updates to a directory)

2001-10-09 Thread Beachey, Kendric

(note: I accidentally sent this straight to Matt earlier, having meant to
send it to the mailing list...sorry Matt...)

 From: Matt McClure [mailto:[EMAIL PROTECTED]]
 
 On Tue Oct 09 2001, 07:59, Bryon Lape [EMAIL PROTECTED] wrote:
 
  Larry Jones wrote:
  
   Bryon Lape writes:
  
User joe checkouts files to his local devel area.  User 
 joe is done and
checks files back in.  CVS updates its database and 
 then copies the
updated files to the shared development area.
  
   http://www.cvshome.org/docs/manual/cvs_18.html#SEC171
  
  Thanks for the information, but as is typical in GNU 
 software, the document
  makes little sense.  Where does one put such a line?
 
 Scroll up a bit in the page.  C.7 is about the loginfo file.

Not to bust your chops too much, but, as is typical in GNU software, the
document makes the most sense when you read all of it.  :-)

In addition to the Cederqvist manual, referenced above, there is some
excellent documentation written by Karl Fogel, which is (mostly) available
at http://cvsbook.red-bean.com/cvsbook.html and which is also (entirely)
available at your local bookstore in a bound volume published by Coriolis.
It's well worth the money to get the printed version, especially now that
the second edition has come out.

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



RE: password generation

2001-09-25 Thread Beachey, Kendric
Title: RE: password generation





Another person posted something similar to what I'm about to post, so now you'll have a couple of choices. :-)


Here are the (perl) scripts I've been using for cvs password maintenance. You may need to adjust the first line to point to your copy of perl. The first script adds a new user to your cvs passwd file, using their username as the initial password. The second script changes a user's cvs password. They're not the greatest solution, I'm sure, but maybe they'll give you an idea for something better.


8--- cut here ---8---
#!/usr/bin/perl
#
# addcvsuser username
#
# Adds a new user to the cvs passwd file, using the user's name as the
# initial password.
#
# ASSumption:
# this script needs to live in the CVSROOT directory, next door to the cvs passwd file.
#
# Shortcoming:
# initial password is lame.

# grab username from command line
my $username = shift;

# generate encrypted password
srand (time());
my $randletter = (int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97));
my $salt = sprintf (%c%c, eval $randletter, eval $randletter);
my $crypttext = crypt ($username, $salt);
my $newpasswdline = sprintf (%s:%s:%s, $username, $crypttext, cvs);

# Check to see that user doesn't already exist
open (PASSWD, passwd);
while (PASSWD)
{
 split (/:/);
 die (User $username already exists.\n) if (@_[0] eq $username);
}
close (PASSWD);

# Add user's line to passwd file
open (PASSWD, passwd);
print PASSWD ${newpasswdline}\n;
close (PASSWD);
8--- cut here ---8---
#!/usr/bin/perl
#
# chcvspasswd username newpassword
#
# ASSumption:
# this script needs to live in your CVSROOT directory, next door to the cvs passwd file.
#
# Shortcomings:
# 1) your password is typed on the command line, so someone else might see it.
# 2) you're not required to prove your identity.
# 3) you don't have to know your old password to change it.

# Grab username and password from command line
my $username = shift;
my $newpasswd = shift;

# Generate encrypted password
srand (time());
my $randletter = (int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97));
my $salt = sprintf (%c%c, eval $randletter, eval $randletter);
my $crypttext = crypt ($newpasswd, $salt);

# Find the user's line in the passwd file and change it
open (PASSWD, passwd);

my $found = no;
my $top = ;
my $middle = ;
my $bottom = ;

while (PASSWD)
{
 chop;
 split (/:/);
 my $loopuser = @_[0];
 my $looppasswd = @_[1];
 my $loopsysuser = @_[2];

 # Not everyone in the world mimics a system user.
 $loopsysuser = : . $loopsysuser unless ($loopsysuser eq );

 my $tempstring = sprintf (%s:%s%s\n, $loopuser, $looppasswd, $loopsysuser);

 if ($loopuser ne $username)
 {
 if ($found eq no)
 {
 $top .= $tempstring;
 }
 else
 {
 $bottom .= $tempstring;
 }
 } # end if loopuser ne username
 else
 {
 $found = yes;
 $tempstring = sprintf (%s:%s%s\n, $username, $crypttext, $loopsysuser);
 $middle = $tempstring;
 }
} # end while PASSWD

# Bail out if the user doesn't exist
die (User $username does not exist.\n) if ($found eq no);

close (PASSWD);

# Rewrite the passwd file with the change
open (PASSWD, passwd);
print PASSWD ($top);
print PASSWD ($middle);
print PASSWD ($bottom);
8--- cut here ---8---


Kendric Beachey