94 |
#$CVSWEB_PORT = "80"; |
#$CVSWEB_PORT = "80"; |
95 |
#$CVSWEB_URI = "source/browse/"; |
#$CVSWEB_URI = "source/browse/"; |
96 |
#$SEND_URL = "true"; |
#$SEND_URL = "true"; |
97 |
$SEND_DIFF = "true"; |
$SEND_DIFF = "false"; |
98 |
|
|
99 |
|
|
100 |
# Set this to a domain to have CVS pretend that all users who make |
# Set this to a domain to have CVS pretend that all users who make |
101 |
# commits have mail accounts within that domain. |
# commits have mail accounts within that domain. |
102 |
#$EMULATE_LOCAL_MAIL_USER="nongnu.org"; |
#$EMULATE_LOCAL_MAIL_USER="nongnu.org"; |
103 |
|
|
|
# Set this to '-c' for context diffs; defaults to '-u' for unidiff format. |
|
|
$difftype = '-uN'; |
|
104 |
|
|
105 |
############################################################ |
############################################################ |
106 |
# |
# |
332 |
$diff .= "(In the diff below, changes in quantity " |
$diff .= "(In the diff below, changes in quantity " |
333 |
. "of whitespace are not shown.)\n\n"; |
. "of whitespace are not shown.)\n\n"; |
334 |
open(DIFF, "-|") |
open(DIFF, "-|") |
335 |
|| exec "$cvsbin/cvs", '-Qn', 'diff', "$difftype", |
|| exec "$cvsbin/cvs", '-Qn', 'diff', '-N', @diffargs, |
336 |
'-b', "-r$oldrev{$file}", "-r$newrev{$file}", '--', $file; |
"-r$oldrev{$file}", "-r$newrev{$file}", '--', $file; |
337 |
|
|
338 |
while (<DIFF>) { |
while (<DIFF>) { |
339 |
$diff .= $_; |
$diff .= $_; |
489 |
## it returns an array of files, %s, sent from the loginfo |
## it returns an array of files, %s, sent from the loginfo |
490 |
## command |
## command |
491 |
# |
# |
492 |
|
# -D - Send diffs in emails. |
493 |
|
# -d DIFF_ARG - Pass DIFF_ARG to `cvs diff' when generating diffs. Defaults |
494 |
|
# to `-ub'. Multiple invocations will pass all DIFF_ARGS |
495 |
|
# (though first invocation always removes the default `-ub'). |
496 |
|
# Implies `-D'. |
497 |
|
# -m EMAIL - Set mailto address. |
498 |
|
# -p PROJECT - Set full repository path. |
499 |
# -r TAG - operate only on changes with tag TAG |
# -r TAG - operate only on changes with tag TAG |
500 |
# -r BRANCH - operate only on changes in branch TAG |
# -r BRANCH - operate only on changes in branch TAG |
501 |
# Use -r "" for "only changes with no tag or branch". |
# Use -r "" for only changes to HEAD. |
502 |
# -u USER - Set CVS username to USER. |
# -u USER - Set CVS username to USER. |
503 |
sub process_argv |
sub process_argv |
504 |
{ |
{ |
509 |
|
|
510 |
while (@argv) { |
while (@argv) { |
511 |
$arg = shift @argv; |
$arg = shift @argv; |
512 |
if ($arg eq '-u' && !defined($cvs_user)) { |
if ($arg eq '-D') { |
513 |
$cvs_user = shift @argv; |
$SEND_DIFF = "true"; |
514 |
|
} elsif ($arg eq '-d') { |
515 |
|
push @diffargs, shift @argv; |
516 |
|
$SEND_DIFF = "true"; |
517 |
} elsif ($arg eq '-m') { |
} elsif ($arg eq '-m') { |
518 |
push @mailto, split (/[ ,]+/, shift @argv); |
push @mailto, split (/[ ,]+/, shift @argv); |
519 |
} elsif ($arg eq '-p') { |
} elsif ($arg eq '-p') { |
521 |
} elsif ($arg eq '-r') { |
} elsif ($arg eq '-r') { |
522 |
$have_r_opt = 1; |
$have_r_opt = 1; |
523 |
$onlytag = shift @argv; |
$onlytag = shift @argv; |
524 |
|
} elsif ($arg eq '-u' && !defined($cvs_user)) { |
525 |
|
$cvs_user = shift @argv; |
526 |
} else { |
} else { |
527 |
($donefiles) && die "Too many arguments!\n"; |
($donefiles) && die "Too many arguments!\n"; |
528 |
$donefiles = !$UseNewInfoFmtStrings; |
$donefiles = !$UseNewInfoFmtStrings; |
589 |
@mailto = (); # Email addresses to send mail to. |
@mailto = (); # Email addresses to send mail to. |
590 |
$update_dir = ""; # The relative directory in the repo the |
$update_dir = ""; # The relative directory in the repo the |
591 |
# sandbox is rooted in. |
# sandbox is rooted in. |
592 |
@files = process_argv(@ARGV); |
@diffargs = (); # Diff options. |
593 |
@path = split('/', $files[0]); |
|
594 |
|
@files = process_argv @ARGV; |
595 |
|
|
596 |
|
# Set defaults that could have been overridden on the command line. |
597 |
|
$update_dir = `cat CVS/Repository` unless $update_dir; |
598 |
|
chomp $update_dir; |
599 |
|
die "Could not determine update dir" unless $update_dir; |
600 |
|
|
601 |
|
push @diffargs, "-ub" unless @diffargs; |
602 |
|
|
603 |
|
|
604 |
|
@path = split '/', $files[0]; |
605 |
if ($#path == 0) { |
if ($#path == 0) { |
606 |
$dir = "."; |
$dir = "."; |
607 |
} else { |
} else { |
608 |
$dir = join('/', @path[1..$#path]); |
$dir = join '/', @path[1..$#path]; |
609 |
} |
} |
610 |
|
|
|
$update_dir = `cat CVS/Repository` unless $update_dir; |
|
|
chomp $update_dir; |
|
|
die "Could not determine update dir" unless $update_dir; |
|
611 |
|
|
612 |
#print("ARGV - ", join(":", @ARGV), "\n"); |
#print("ARGV - ", join(":", @ARGV), "\n"); |
613 |
#print("files - ", join(":", @files), "\n"); |
#print("files - ", join(":", @files), "\n"); |