Lines Matching refs:file

8 # The contents of this file are subject to the terms of the
10 # (the "License"). You may not use this file except in compliance
19 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
90 # Map status to file name
92 # Descriptions of file status flags
104 # Map property change status to file name
107 # Descriptions of file status flags
162 } elsif ($line =~ /^File: no file (.+)\s+Status: (.*)/) {
240 my $file = shift;
242 system ("mkdir -p $webrev_dir/$file");
244 msg_error ("Failed to create directory $webrev_dir/$file");
252 my $file = shift;
253 my $basename = basename ($file);
254 system ("rm -f $webrev_dir/$file/new.$basename; cp $file $webrev_dir/$file/new.$basename");
256 msg_fatal ("failed to copy file $file to $webrev_dir/$file");
258 return "[<A HREF=\"$file/new.$basename\">new</A>] ";
263 my $file = shift;
264 my $basename = basename ($file);
265 system ("rm -f $webrev_dir/$file/old.$basename");
270 system ("svn --non-interactive cat -r BASE $file > $webrev_dir/$file/old.$basename");
275 my $rev=`LC_ALL=C cvs -z3 status $file | grep 'Working revision' | cut -f2 -d:`;
277 my $CVSDIR = dirname ($file) . "/CVS";
286 system ("cd $webrev_dir/tmp && LC_ALL=C cvs -q -z3 -d $CVSROOT co -r$rev $REPO/$basename >/dev/null 2>&1 && mv $REPO/$basename $webrev_dir/$file/old.$basename && cd / && rm -rf $webrev_dir/tmp");
291 return "[<A HREF=\"$file/old.$basename\">old</A>] ";
297 my $file = shift;
298 my $basename = basename ($file);
301 @diff = `svn --non-interactive diff $file`;
303 @diff = `cd $webrev_dir/$file; /usr/bin/diff -u old.$basename new.$basename`;
305 system ("rm -f $webrev_dir/$file/udiff.html");
309 sysopen (DIFF, "$webrev_dir/$file/udiff.html", O_WRONLY | $overwrite | O_CREAT) or
310 msg_error ("failed to create file $webrev_dir/$file/udiff.html");
312 print DIFF eval_template ($file_page_header, "Unified diff of $file");
336 return "[<A HREF=\"$file/udiff.html\">udiff</A>] ";
342 my $file = shift;
343 my $basename = basename ($file);
344 if (! -f "$webrev_dir/$file/new.$basename") {
345 gen_diff_new ($webrev_dir, $file);
347 if (! -f "$webrev_dir/$file/old.$basename") {
348 gen_diff_old ($webrev_dir, $file);
350 my @diff = `cd $webrev_dir/$file; /usr/bin/diff -c old.$basename new.$basename`;
351 system ("rm -f $webrev_dir/$file/cdiff.html");
355 sysopen (DIFF, "$webrev_dir/$file/cdiff.html", O_WRONLY | $overwrite | O_CREAT) or
356 msg_error ("failed to create file $webrev_dir/$file/cdiff.html");
357 print DIFF eval_template ($file_page_header, "Context diff of $file");
379 return "[<A HREF=\"$file/cdiff.html\">cdiff</A>] ";
454 my $file = shift;
455 my $basename = basename ($file);
459 if (! -f "$webrev_dir/$file/new.$basename") {
460 gen_diff_new ($webrev_dir, $file);
462 if (! -f "$webrev_dir/$file/old.$basename") {
463 gen_diff_old ($webrev_dir, $file);
465 my $total_lines = `cat $webrev_dir/$file/old.$basename | wc -l`;
469 my @diff = `cd $webrev_dir/$file; /usr/bin/diff -U $SDIFF_CONTEXT old.$basename new.$basename`;
471 # the 1st 2 lines are the file names
495 # new lines added to the file: print them on the right side in blue
569 system ("rm -f $webrev_dir/$file/sdiff.html");
573 sysopen (DIFF, "$webrev_dir/$file/sdiff.html", O_WRONLY | $overwrite | O_CREAT) or
574 msg_error ("failed to create file $webrev_dir/$file/sdiff.html");
575 print DIFF eval_template ($file_page_header, "Side by side diff of $file");
604 return "[<A HREF=\"$file/sdiff.html\">sdiff</A>] ";
609 my $file = shift;
610 my $basename = basename ($file);
612 system ("rm -f $webrev_dir/$file/$basename.diff; svn --non-interactive diff $file > $webrev_dir/$file/$basename.diff");
614 system ("rm -f $webrev_dir/$file/$basename.diff; cvs -q diff -up $file > $webrev_dir/$file/$basename.diff");
619 return "[<A HREF=\"$file/$basename.diff\">patch</A>] ";
625 # find updated ChangeLog files and extract the entries for each file
627 foreach my $file (sort keys %file_status) {
628 if ($file eq "ChangeLog" or $file =~ /\/ChangeLog$/) {
631 @chlog_lines = `svn --non-interactive diff $file | grep "^\+"`;
633 @chlog_lines = `cvs -q diff -u $file | grep "^\+"`;
635 my $dirname = dirname ($file);
644 # * file: foo bar
651 # * file: foo bar
660 # assign the same entry to each file listed with
684 msg_fatal ("failed to create file $webrev_dir/index.html");
705 foreach my $file (sort keys %file_status) {
706 print " $file\n";
707 print INDEX "<P><B>$file</B> ($status_desc{$file_status{$file}})<BR>\n";
709 make_base_dir ($webrev_dir, $file) or
711 if ($file_status{$file} eq 'A') {
712 print INDEX gen_diff_new ($webrev_dir, $file);
713 my $lines = `cat $file | wc -l`;
718 } elsif ($file_status{$file} eq 'D') {
719 print INDEX gen_diff_old ($webrev_dir, $file);
721 my $basename = basename ($file);
722 my $lines = `cat $webrev_dir/$file/old.$basename | wc -l`;
726 } elsif ($file_status{$file} eq '?') {
727 next if -d $file;
728 print INDEX gen_diff_new ($webrev_dir, $file);
730 my $lines = `cat $file | wc -l`;
734 } elsif ($file_status{$file} eq 'M') {
736 $label = gen_diff_old ($webrev_dir, $file);
739 $label = gen_diff_new ($webrev_dir, $file);
742 $label = gen_diff_udiff ($webrev_dir, $file);
745 $label = gen_diff_cdiff ($webrev_dir, $file);
748 $label = gen_diff_sdiff ($webrev_dir, $file);
751 $label = gen_diff_patch ($webrev_dir, $file);
752 my $basename = basename ($file);
753 my $changed_lines = `diff -c $webrev_dir/$file/old.$basename $webrev_dir/$file/new.$basename | grep '^! ' | wc -l`;
755 my $deleted_lines = `diff -c $webrev_dir/$file/old.$basename $webrev_dir/$file/new.$basename | grep '^- ' | wc -l`;
757 my $new_lines = `diff -c $webrev_dir/$file/old.$basename $webrev_dir/$file/new.$basename | grep '^+ ' | wc -l`;
759 my $total_lines = `cat $webrev_dir/$file/old.$basename | wc -l`;
769 if (defined ($changelog_entry{$file})) {
771 print INDEX $changelog_entry{$file};
773 } elsif ($file ne "ChangeLog" and not $file =~ /\/ChangeLog$/) {