Gnus development mailing list
 help / color / mirror / Atom feed
* Patches for cvs and cvslog
@ 2002-01-01  7:32 Lars Magne Ingebrigtsen
  2002-01-02  5:27 ` Russ Allbery
  2002-01-03 13:25 ` Per Abrahamsen
  0 siblings, 2 replies; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-01  7:32 UTC (permalink / raw)



I've applied the following patch from Jason L Tibbitts III:

--- server.c.orig	Thu Sep 24 19:17:31 1998
+++ server.c	Wed Nov 11 09:43:00 1998
@@ -5060,6 +5060,7 @@
 {
     int rc;
     char *host_user = NULL;
+    char *env;
 
     /* First we see if this user has a password in the CVS-specific
        password file.  If so, that's enough to authenticate with.  If
@@ -5175,6 +5176,10 @@
            It might or might not be the same as host_user. */
         CVS_Username = xmalloc (strlen (username) + 1);
         strcpy (CVS_Username, username);
+
+	env = xmalloc (sizeof "CVSUSER=" + strlen (CVS_Username));
+	(void) sprintf (env, "CVSUSER=%s", CVS_Username);
+	(void) putenv (env);
     }
 
     return host_user;

And then did the following change myself:
     
--- cvslog~	Sun Dec 30 07:07:35 2001
+++ cvslog	Tue Jan  1 08:28:44 2002
@@ -409,7 +409,7 @@
 # information about the change.  Returns the header as a list.
 sub build_header {
     my ($data, $showdir) = @_;
-    my $user = (getpwuid $<)[0] || $<;
+    my $user = $ENV{CVSUSER} || (getpwuid $<)[0] || $<;
     my $date = strftime ('%A, %B %e, %Y @ %T', localtime time);
     $date =~ s/  / /;
     my @header;


And now the log messages has the user name of the person who commits,
and not just "cvs".
     
-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2002-02-18 17:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-01  7:32 Patches for cvs and cvslog Lars Magne Ingebrigtsen
2002-01-02  5:27 ` Russ Allbery
2002-01-03 13:25 ` Per Abrahamsen
2002-01-03 14:19   ` Lars Magne Ingebrigtsen
2002-01-03 14:22     ` Lars Magne Ingebrigtsen
2002-01-03 15:17       ` Lars Magne Ingebrigtsen
2002-01-03 15:20         ` Lars Magne Ingebrigtsen
2002-01-03 15:30           ` Per Abrahamsen
2002-01-03 16:25             ` Lars Magne Ingebrigtsen
2002-01-03 15:30         ` Russ Allbery
2002-01-03 16:27           ` Lars Magne Ingebrigtsen
2002-01-03 16:56             ` Michael Cook
2002-02-17  0:18             ` Russ Allbery
2002-02-18  1:22               ` Lars Magne Ingebrigtsen
2002-02-18  3:32                 ` Russ Allbery
2002-02-18 17:28                 ` Steinar Bang
2002-01-03 15:24     ` Per Abrahamsen
2002-01-03 15:25     ` ShengHuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).