Lines Matching refs:FILE
37 use File::Basename;
38 use File::Spec;
148 # Note, this method will not error if the file corresponding to the $source path does not exist.
160 # Note, this method will not error if the file corresponding to the path does not exist.
197 return system("cd $dir && git rev-parse > " . File::Spec->devnull() . " 2>&1") == 0;
251 return -d File::Spec->catdir($dir, ".svn");
287 return File::Spec->abs2rel($previousDirectory, $newDirectory);
307 open INFO, "svn info '$path' 2> " . File::Spec->devnull() . " |" or die;
334 $path = File::Spec->catdir($parent, $path);
337 return File::Spec->rel2abs($last);
375 my ($file) = @_;
376 my $relativePath = File::Spec->abs2rel($file);
428 my ($file) = @_;
431 $file = File::Spec->canonpath($file);
435 foreach my $dir (File::Spec->splitdir($file)) {
442 return ($#dirs >= 0) ? File::Spec->catdir(@dirs) : ".";
479 my ($file) = @_;
481 if (open(FILE, $file)) {
482 $eol = parseFirstEOL(*FILE);
483 close(FILE);
498 my $normalizedFullPath = File::Spec->catdir(File::Spec->splitdir($fullPath));
502 my $normalizedStatPath = File::Spec->catdir(File::Spec->splitdir(substr($_, 7)));
520 # Return whether the given file mode is executable in the source control
527 # $fileMode: A number or string representing a file mode in octal notation.
535 # Parse the next Git diff header from the given file handle, and advance
548 # copiedFromPath: the path from which the file was copied or moved if
552 # this value only if the file is executable, in which
554 # indexPath: the path of the target file.
555 # isBinary: the value 1 if the diff is for a binary file.
556 # isDeletion: the value 1 if the diff is a file deletion.
557 # isCopyWithChanges: the value 1 if the file was copied or moved and
558 # the target file was changed in some way after being
561 file.
562 # shouldDeleteSource: the value 1 if the file was copied or moved and
563 # the source file was deleted -- i.e. if the copy
577 # and renames. We use the second file path because it is the
602 if (/^(deleted file|old) mode (\d+)/) {
604 $isDeletion = 1 if $1 eq "deleted file";
605 } elsif (/^new( file)? mode (\d+)/) {
616 # everything about the file being deleted in order to
632 die("Error: the Git diff contains a binary file without the binary data in ".
639 $_ = <$fileHandle>; # Not defined if end-of-file reached.
661 # Parse the next SVN diff header from the given file handle, and advance
675 # copiedFromPath: the path from which the file was copied if the diff
677 # indexPath: the path of the target file, which is the path found in
679 # isBinary: the value 1 if the diff is for a binary file.
680 # isNew: the value 1 if the diff is for a new file.
682 # is the same as the revision number the file was copied
683 # from, in the case of a file copy.
729 } elsif (/^Cannot display: file marked as a binary type.$/) {
736 $_ = <$fileHandle>; # Not defined if end-of-file reached.
757 # Parse the next diff header from the given file handle, and advance
772 # copiedFromPath: the path from which the file was copied if the diff
776 # this value only if the file is executable, in which
778 # indexPath: the path of the target file.
779 # isBinary: the value 1 if the diff is for a binary file.
783 # is the same as the revision number the file was copied
784 # from, in the case of a file copy.
820 # file operation (e.g. a file modification, copy, or delete).
827 # copiedFromPath: the path from which the file was copied if the diff
830 # removed from the target file, respectively.
831 # indexPath: the path of the target file. For SVN-formatted diffs,
833 # isBinary: the value 1 if the diff is for a binary file.
836 # isNew: the value 1 if the dif is known from the header to be a new file.
839 # is the same as the revision number the file was copied
840 # from, in the case of a file copy.
844 # Parse one diff from a patch file created by svn-create-patch, and
845 # advance the file handle so the last line read is the first line
858 # $fileHandle: a file handle advanced to the first line of the next
864 # instead of the line endings in the target file; the
899 # diff for a file that only has property changes.
951 # it evaluates to false when there is no headerHashRef (e.g. a property change diff for a file that
954 # Then add the usual file modification.
974 # If the file was copied, then we have already incorporated the
983 # diff for a file that only has property changes will not return
990 # A property change diff for a file that only has property changes.
1001 # Parse an SVN property change diff from the given file handle, and advance
1018 # propertyPath: the path of the target file.
1020 # removed from the target file, respectively.
1042 $_ = <$fileHandle>; # Not defined if end-of-file reached.
1054 # Notice, we keep processing until we hit end-of-file or some
1071 # Parse the next SVN property from the given file handle, and advance the handle so the last
1109 $_ = <$fileHandle>; # Not defined if end-of-file reached.
1165 # Parse the value of an SVN property from the given file handle, and advance
1216 # Parse a patch file created by svn-create-patch.
1219 # $fileHandle: A file handle to the patch file that has not yet been
1224 # instead of the line endings in the target file; the
1260 # @diffHashRefs that represent file copies. The original
1263 # @diffHashRefs that do not represent file copies.
1304 die "Two revisions of the same file required as a source:\n".
1369 # file -- i.e. no leading context and all lines starting with "+".
1375 # both the beginning of the new ChangeLog file matches the beginning
1381 # insert new ChangeLog entries at the top of the ChangeLog file.
1393 # newest ChangeLog entry inserted at the top of the file, if possible.
1466 if ($shouldTrimContext) { # Also occurs if end of file reached.
1488 # assumption that the beginning of the source file was not modified.
1576 # $pathRelativeToRoot: the path of the file to be patched, relative to the
1582 # patch command gleans the actual file to patch
1605 open PATCH, "| $patchCommand" or die "Could not call \"$patchCommand\" for file \"$pathRelativeToRoot\": $!";
1613 print "Calling \"$patchCommand\" for file \"$pathRelativeToRoot\" returned " .
1621 # Merge ChangeLog patches using a three-file approach.
1630 # $fileMine: The merged version of the file. Also known in git as the
1632 # For traditional patch rejects, this is the *.rej file.
1633 # $fileOlder: The base version of the file. Also known in git as the
1635 # For traditional patch rejects, this is the *.orig file.
1636 # $fileNewer: The current version of the file. Also known in git as the
1639 # file.
1666 open(PATCH, "| patch --force --fuzz=3 --binary $fileNewer > " . File::Spec->devnull()) or die $!;