Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 71
- Log:
Start of upgrade to Typo 4.0.0, the latest stable release since
2.6.0. Note test/mocks/themes/azure changes from a file to a
directory, so the file has been removed in this revision and
the directory will be added in the next revision.
- Author:
- adh
- Date:
- Mon Aug 07 22:18:11 +0100 2006
- Size:
- 1171 Bytes
- Properties:
- Property svn:executable is set to *
1 | #!/usr/bin/env ruby |
2 | |
3 | require 'fileutils' |
4 | |
5 | def filelint(filename, fix = false) |
6 | newfile = '' |
7 | File.open(filename) do |file| |
8 | file.readlines.each_with_index do |line, lineno| |
9 | # do some checking so we can print warnings |
10 | if line =~ /[ \t]$/ |
11 | puts "#{filename}:#{lineno+1} Trailing whitespace" |
12 | end |
13 | if line =~ /\r\n?$/ |
14 | puts "#{filename}:#{lineno+1} Incorrect line ending" |
15 | elsif line[-1] != ?\n |
16 | puts "#{filename}:#{lineno+1} No trailing newline" |
17 | end |
18 | # now just rstrip the line and shove it in the array |
19 | # this will strip trailing whitespace and normalize line endings for us |
20 | # the above stuff is simply so you know when you screwed up |
21 | newfile << line.rstrip << "\n" |
22 | end |
23 | end |
24 | |
25 | if fix && File.read(filename) != newfile |
26 | newname = ".#{filename}.new" |
27 | File::unlink("#{filename}~") rescue nil |
28 | File.open(newname,'w') { |f| f.write(newfile) } |
29 | stat = File.stat(filename) |
30 | File.chmod(stat.mode, newname) |
31 | FileUtils.ln filename, "#{filename}~" |
32 | FileUtils.ln newname, filename, :force => true |
33 | File::unlink(newname) |
34 | end |
35 | |
36 | end |
37 | |
38 | ARGV.each do |f| |
39 | filelint(f,true) |
40 | end |