Subject: | support for mercurial |
Attached is a patch against 1.60 which adds support for mercurial
.hgignore files. I've modeled it on the .git support (if bald-faced
duplication can count as modeling).
Thanks,
Diab
Subject: | Module-Starter.patch |
# This is a patch for Module-Starter-1.60.orig to update it to Module-Starter-1.60
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####
#### Patch data follows ####
diff -c 'Module-Starter-1.60.orig/lib/Module/Starter.pm' 'Module-Starter-1.60/lib/Module/Starter.pm'
Index: ./lib/Module/Starter.pm
*** ./lib/Module/Starter.pm Thu Oct 25 14:31:46 2012
--- ./lib/Module/Starter.pm Wed Jan 23 10:37:30 2013
***************
*** 56,62 ****
license => $license, # type of license; defaults to 'perl'
author => $author, # author's full name (taken from C<getpwuid> if not provided)
email => $email, # author's email address (taken from C<EMAIL> if not provided)
! ignores_type => $type, # ignores file type ('generic', 'cvs', 'git', 'manifest' )
verbose => $verbose, # bool: print progress messages; defaults to 0
force => $force # bool: overwrite existing files; defaults to 0
--- 56,62 ----
license => $license, # type of license; defaults to 'perl'
author => $author, # author's full name (taken from C<getpwuid> if not provided)
email => $email, # author's email address (taken from C<EMAIL> if not provided)
! ignores_type => $type, # ignores file type ('generic', 'cvs', 'git', 'hg', 'manifest' )
verbose => $verbose, # bool: print progress messages; defaults to 0
force => $force # bool: overwrite existing files; defaults to 0
***************
*** 67,72 ****
--- 67,73 ----
ignores_type => 'generic' # default, creates 'ignore.txt'
ignores_type => 'cvs' # creates .cvsignore
ignores_type => 'git' # creates .gitignore
+ ignores_type => 'hg' # creates .hgignore
ignores_type => 'manifest' # creates MANIFEST.SKIP
It is also possible to provide an array ref with multiple types wanted:
diff -c 'Module-Starter-1.60.orig/lib/Module/Starter/Simple.pm' 'Module-Starter-1.60/lib/Module/Starter/Simple.pm'
Index: ./lib/Module/Starter/Simple.pm
*** ./lib/Module/Starter/Simple.pm Thu Oct 25 14:31:55 2012
--- ./lib/Module/Starter/Simple.pm Thu Jan 24 11:39:39 2013
***************
*** 822,827 ****
--- 822,828 ----
#IRC => 'irc://irc.perl.org/#$self->{distro}',
license => '$license_url',
#repository => 'git://github.com/$self->{author}/$self->{distro}.git',
+ #repository => 'https://bitbucket.org/$self->{author}/$self->{distro}',
bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=$self->{distro}',
);
***************
*** 1410,1415 ****
--- 1411,1417 ----
generic => 'ignore.txt',
cvs => '.cvsignore',
git => '.gitignore',
+ hg => '.hgignore',
manifest => 'MANIFEST.SKIP',
);
***************
*** 1476,1482 ****
,v$
\B\.svn\b
\b_darcs\b
! # (.git only in top-level, hence it's blocked above)
# Avoid temp and backup files.
~$
--- 1478,1484 ----
,v$
\B\.svn\b
\b_darcs\b
! # (.git or .hg only in top-level, hence it's blocked above)
# Avoid temp and backup files.
~$
***************
*** 1499,1505 ****
\.rej$
EOF
};
! $guts->{cvs} = $guts->{git} = $guts->{generic};
return $guts->{$type};
}
--- 1501,1507 ----
\.rej$
EOF
};
! $guts->{hg} = $guts->{cvs} = $guts->{git} = $guts->{generic};
return $guts->{$type};
}
diff -c 'Module-Starter-1.60.orig/t/test-dist.t' 'Module-Starter-1.60/t/test-dist.t'
Index: ./t/test-dist.t
*** ./t/test-dist.t Thu Oct 25 13:50:00 2012
--- ./t/test-dist.t Thu Jan 24 11:39:55 2013
***************
*** 728,733 ****
--- 728,734 ----
#IRC => 'irc://irc.perl.org/#$distro',
license => '$license_url',
#repository => 'git://github.com/$self->{author}/$distro.git',
+ #repository => 'https://bitbucket.org/$self->{author}/$self->{distro}',
bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=$distro',
);
***************
*** 801,807 ****
,v$
\B\.svn\b
\b_darcs\b
! # (.git only in top-level, hence it's blocked above)
# Avoid temp and backup files.
~$
--- 802,808 ----
,v$
\B\.svn\b
\b_darcs\b
! # (.git or .hg only in top-level, hence it's blocked above)
# Avoid temp and backup files.
~$
#### End of Patch data ####
#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Thu Jan 24 11:40:19 2013
# Generated by : makepatch 2.04
# Recurse directories : Yes
# Excluded files : (\A|/).*\~\Z
# (\A|/).*\.a\Z
# (\A|/).*\.bak\Z
# (\A|/).*\.BAK\Z
# (\A|/).*\.elc\Z
# (\A|/).*\.exe\Z
# (\A|/).*\.gz\Z
# (\A|/).*\.ln\Z
# (\A|/).*\.o\Z
# (\A|/).*\.obj\Z
# (\A|/).*\.olb\Z
# (\A|/).*\.old\Z
# (\A|/).*\.orig\Z
# (\A|/).*\.rej\Z
# (\A|/).*\.so\Z
# (\A|/).*\.Z\Z
# (\A|/)\.del\-.*\Z
# (\A|/)\.make\.state\Z
# (\A|/)\.nse_depinfo\Z
# (\A|/)core\Z
# (\A|/)tags\Z
# (\A|/)TAGS\Z
# p 'lib/Module/Starter.pm' 4807 1358955450 0100644
# p 'lib/Module/Starter/Simple.pm' 48062 1359045579 0100644
# p 't/test-dist.t' 45386 1359045595 0100644
#### End of ApplyPatch data ####
#### End of Patch kit [created: Thu Jan 24 11:40:19 2013] ####
#### Patch checksum: 156 5482 53321 ####
#### Checksum: 174 6187 46343 ####