1File::Find::Rule::VCS(3U)ser Contributed Perl DocumentatiFoinle::Find::Rule::VCS(3)
2
3
4
6 File::Find::Rule::VCS - Exclude files/directories for Version Control
7 Systems
8
10 use File::Find::Rule ();
11 use File::Find::Rule::VCS ();
12
13 # Find all files smaller than 10k, ignoring version control files
14 my @files = File::Find::Rule->ignore_vcs
15 ->file
16 ->size('<10Ki')
17 ->in( $dir );
18
20 Many tools need to be equally useful both on ordinary files, and on
21 code that has been checked out from revision control systems.
22
23 File::Find::Rule::VCS provides quick and convenient methods to exclude
24 the version control directories of several major Version Control
25 Systems (currently CVS, subversion, and Bazaar).
26
27 File::Find::Rule::VCS implements methods to ignore the following:
28
29 CVS
30 Subversion
31 Bazaar
32
33 In addition, the following version control systems do not create
34 directories in the checkout and do not require the use of any ignore
35 methods
36
37 SVK
38 Git
39
41 ignore_vcs
42 # Ignore all common version control systems
43 $find->ignore_vcs;
44
45 # Ignore a specific named version control systems
46 $find->ignore_vcs($name);
47
48 # Ignore nothing (silent pass-through)
49 $find->ignore_vcs('');
50
51 The "ignore_vcs" method excludes the files for a named Version Control
52 System from your File::Find::Rule search.
53
54 If passed, the name of the version control system is case in-sensitive.
55 Names currently supported are 'cvs', 'svn', 'subversion', 'bzr', and
56 'bazaar'.
57
58 As a convenience for high-level APIs, if the VCS name is the defined
59 null string '' then the call will be treated as a nullop.
60
61 If no params at all are passed, this method will ignore all supported
62 version control systems. If ignoring every version control system,
63 please note that any legitimate directories called "CVS" or files
64 starting with .# will be ignored, which is not always desirable.
65
66 In widely-distributed code, you instead should try to detect the
67 specific version control system used and call ignore_vcs with the
68 specific name.
69
70 Passing "undef", or an unsupported name, will throw an exception.
71
72 ignore_cvs
73 The "ignore_cvs" method excluding all CVS directories from your
74 File::Find::Rule search.
75
76 It will also exclude all the files left around by CVS after an
77 automated merge that start with '.#' (dot-hash).
78
79 ignore_svn
80 The "ignore_svn" method excluding all Subversion (".svn") directories
81 from your File::Find::Rule search.
82
83 ignore_bzr
84 The "ignore_bzr" method excluding all Bazaar (".bzr") directories from
85 your File::Find::Rule search.
86
88 - Add support for other version control systems.
89
90 - Add other useful VCS-related methods
91
93 Bugs should always be submitted via the CPAN bug tracker
94
95 http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-VCS
96 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-VCS>
97
98 For other issues, contact the maintainer
99
101 Adam Kennedy <adamk@cpan.org>
102
104 <http://ali.as/>, File::Find::Rule
105
107 Copyright 2005 - 2008 Adam Kennedy.
108
109 This program is free software; you can redistribute it and/or modify it
110 under the same terms as Perl itself.
111
112 The full text of the license can be found in the LICENSE file included
113 with this module.
114
115
116
117perl v5.12.0 2008-09-29 File::Find::Rule::VCS(3)