]>
Commit | Line | Data |
---|---|---|
f960e9e7 VZ |
1 | #!/usr/bin/perl |
2 | # | |
fa699cba VZ |
3 | # This script produces the list of all files using native svn:eol-style. |
4 | # | |
5 | # It's used as a helper for distribution creation as this is also the | |
6 | # list of files which need to have their line endings converted for | |
7 | # the use on the platform other than the current one. | |
f960e9e7 VZ |
8 | # |
9 | # Notice that the script requires Perl 5.10 (which could be easily avoided but | |
10 | # as this is for my personal use mostly so far, I didn't bother) and Perl svn | |
11 | # bindings. | |
12 | use 5.10.0; | |
13 | use strict; | |
14 | use warnings; | |
15 | use SVN::Client; | |
16 | ||
fa699cba VZ |
17 | # Normally we get the list directly from the server but this is slow, |
18 | # so if you already have an (up to date!) svn checkout, you can also | |
19 | # pass a path to it here, the script will work much faster then. | |
20 | my $root = $ARGV[0] // 'https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk'; | |
21 | ||
f960e9e7 VZ |
22 | my $ctx = SVN::Client->new |
23 | or die "Failed to create svn context, do you have svn auth stored?\n"; | |
24 | ||
fa699cba VZ |
25 | my $props = $ctx->proplist($root, undef, 1) |
26 | or die "Failed to list properties for files under $root.\n"; | |
f960e9e7 VZ |
27 | |
28 | foreach my $prop (@$props) { | |
29 | my $eol = ${$prop->prop_hash()}{'svn:eol-style'}; | |
30 | if ( defined $eol && ($eol eq 'native') ) { | |
fa699cba VZ |
31 | my $rel = $prop->node_name(); |
32 | substr($rel, 0, length($root) + 1, ''); # +1 for leading slash | |
33 | ||
34 | say $rel; | |
f960e9e7 VZ |
35 | } |
36 | } |