Permalink
Browse files

[tools] Remove ancient/dumb .gitignore-generating code

This code hasn't done anything useful since we switched to Git. Everyone
can now add stuff to .gitignore as they see fit.
  • Loading branch information...
1 parent ee5be9c commit 3f5d600bb51ec05b0c7ed3d126bc54c377ca0d26 @leto leto committed Jan 21, 2011
Showing with 24 additions and 87 deletions.
  1. +11 −6 .gitignore
  2. +10 −0 MANIFEST.SKIP
  3. +3 −81 lib/Parrot/Manifest.pm
View
@@ -1,10 +1,15 @@
-# ex: set ro:
-# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl
-# .gitignore
-#
-# Ignore any remaining SVN directories
+# Ignore SVN, if people are using the SVN Github interface (danger!)
/\B.svn\b
+
+# Ignore core files
+/core*
+
+# Ignore patch-related stuff
+*.rej
+*.orig
+*.patch
+*.diff
+
# ports/ should not go into release tarballs
/ports
/*.core
View
@@ -14,6 +14,14 @@
# ports/ should not go into release tarballs
^ports$
^ports/
+^.*\.diff$
+^.*\.diff/
+^.*\.orig$
+^.*\.orig/
+^.*\.patch$
+^.*\.patch/
+^.*\.rej$
+^.*\.rej/
^/.*\.core$
^/.*\.core/
^/.*\.def$
@@ -134,6 +142,8 @@
^/compilers/tge/tgc\.pbc/
^/config_lib\.pir$
^/config_lib\.pir/
+^/core.*$
+^/core.*/
^/cover_db$
^/cover_db/
^/docs/.*\.tmp$
View
@@ -18,9 +18,6 @@ Parrot::Manifest - Re-create MANIFEST and MANIFEST.SKIP
$need_for_skip = $mani->determine_need_for_manifest_skip($print_str);
$mani->print_manifest_skip($print_str) if $need_for_skip;
- $print_str = $mani->prepare_gitignore();
- $mani->print_gitignore($print_str) if $need_for_skip;
-
=head1 DESCRIPTION
This package exports no functions. A Parrot::Manifest object is used in
@@ -43,7 +40,6 @@ use File::Basename;
script => $0,
file => $filename,
skip => $skipfilename,
- gitignore => $gitignoresfilename,
})
Creates a Parrot::Manifest object by asking C<git status> for verbose output,
@@ -52,9 +48,6 @@ and parsing the results.
C<file> is the name of the file that the manifest will eventually be written
to, and defaults to F<MANIFEST>. C<skip> is the name of the file that will
hold the list of files to be skipped, and defaults to F<MANIFEST.SKIP>.
-C<gitignore> contains the same information as F<MANIFEST.SKIP> in a different
-format. It defaults to F<.gitignore>. The C<script> parameter is the name of
-the program invoking Parrot::Manifest, for use in messages.
=cut
@@ -69,7 +62,6 @@ sub new {
script => $argsref->{script},
file => $argsref->{file} ? $argsref->{file} : q{MANIFEST},
skip => $argsref->{skip} ? $argsref->{skip} : q{MANIFEST.SKIP},
- gitignore => $argsref->{gitignore} ? $argsref->{gitignore} : q{.gitignore},
);
my $lsfiles = qx($data{cmd} ls-files );
@@ -291,7 +283,7 @@ sub _get_current_files {
$print_str = $mani->prepare_manifest_skip();
-Gets a list of the files that git ignores, and returns a string that can be
+Gets a list of the files that Git ignores, and returns a string that can be
put into F<MANIFEST.SKIP>.
=cut
@@ -304,22 +296,6 @@ sub prepare_manifest_skip {
return $self->_compose_manifest_skip($ignores_ref);
}
-=head2 prepare_gitignore
-
- $print_str = $mani->prepare_gitignore();
-
-Gets a list of the files that SVN ignores, and then writes it to the
-F<.gitignore> file.
-
-=cut
-
-sub prepare_gitignore {
- my $self = shift;
-
- my $ignores_ref = $self->_get_ignores();
-
- return $self->_compose_gitignore($ignores_ref);
-}
=head2 determine_need_for_manifest_skip
@@ -386,32 +362,11 @@ sub print_manifest_skip {
return 1;
}
-=head2 print_gitignore
-
- $mani->print_gitignore($print_str) if $need_for_skip;
-
-Writes the F<.gitignore> file. The example above does so only if needed.
-
-=cut
-
-sub print_gitignore {
- my $self = shift;
- my $print_str = shift;
-
- open my $GITIGNORE, '>', $self->{gitignore}
- or die "Unable to open $self->{gitignore} for writing";
- $print_str .= $text_file_coda;
- print $GITIGNORE $print_str;
- close $GITIGNORE
- or die "Unable to close $self->{gitignore} after writing";
-
- return 1;
-}
-
-# Gets a list of files that SVN ignores
+# Gets a list of files that Git ignores
sub _get_ignores {
my $self = shift;
+ # HACK: Make this portable
my $gitignore = `cat .gitignore| grep -v '^#'`;
my %ignores;
@@ -429,39 +384,6 @@ sub _get_ignores {
return \%ignores;
}
-# Turns the list of ignored files into .gitignore format
-sub _compose_gitignore {
- my $self = shift;
- my $ignores_ref = shift;
-
- my $print_str = <<"END_HEADER";
-# ex: set ro:
-# $self->{id}
-# generated by $self->{script}
-#
-# This file should contain a transcript of the svn:ignore properties
-# of the directories in the Parrot subversion repository.
-# The .gitignore file is a convenience for developers working with git-svn.
-# See http://www.kernel.org/pub/software/scm/git/docs/gitignore.html for the
-# format of this file.
-#
-END_HEADER
-
- foreach my $directory ( sort keys %{$ignores_ref} ) {
- my $dir = $directory;
- $dir =~ s!\\!/!g;
- $print_str .= "# generated from svn:ignore of '$dir/'\n";
- foreach ( sort split /\n/, $ignores_ref->{$directory} ) {
- $print_str .=
- ( $dir ne '.' )
- ? "/$dir/$_\n"
- : "/$_\n";
- }
- }
-
- return $print_str;
-}
-
# Turns list of ignored files into F<MANIFEST.SKIP> format
sub _compose_manifest_skip {
my $self = shift;

0 comments on commit 3f5d600

Please sign in to comment.