]> git.saurik.com Git - wxWidgets.git/blame_incremental - build/tools/svn-find-native-eols.pl
Fix for #15520: wxRichTextCtrl: Drawing the selection doesn't respect its container...
[wxWidgets.git] / build / tools / svn-find-native-eols.pl
... / ...
CommitLineData
1#!/usr/bin/perl
2#
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.
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.
12use 5.10.0;
13use strict;
14use warnings;
15use SVN::Client;
16
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.
20my $root = $ARGV[0] // 'https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk';
21
22my $ctx = SVN::Client->new
23 or die "Failed to create svn context, do you have svn auth stored?\n";
24
25my $props = $ctx->proplist($root, undef, 1)
26 or die "Failed to list properties for files under $root.\n";
27
28foreach my $prop (@$props) {
29 my $eol = ${$prop->prop_hash()}{'svn:eol-style'};
30 if ( defined $eol && ($eol eq 'native') ) {
31 my $rel = $prop->node_name();
32 substr($rel, 0, length($root) + 1, ''); # +1 for leading slash
33
34 say $rel;
35 }
36}