|
Revision 456:371df097a76e, 1.0 kB
(checked in by ser, 15 months ago)
|
r1279@bean: ser | 2007-06-09 23:19:02 -0400
Fixes ticket:89 -- encoding CP-1252 was broken. ISO-8859-15 had the same
problem.
Also in this patch is a fix to merge.rb (unused, but it should at least
contain no errors), and a unit test for ticket:88.
|
|
|
| Line | |
|---|
| 1 | #!/usr/bin/ruby |
|---|
| 2 | # Takes a path to a Ruby SVN branch and to a REXML branch, |
|---|
| 3 | # and merges the differences to the Ruby branch. |
|---|
| 4 | |
|---|
| 5 | old_revision = 0 |
|---|
| 6 | new_revision = 0 |
|---|
| 7 | rexml =ARGV[0] |
|---|
| 8 | ruby =ARGV[1] |
|---|
| 9 | |
|---|
| 10 | Dir.chdir( ruby ) { |
|---|
| 11 | old_revision=`svn propget rexml:main-repo-version lib/rexml`.to_i |
|---|
| 12 | } |
|---|
| 13 | info = `svn info #{rexml}`.split |
|---|
| 14 | index = info.index("Revision:") |
|---|
| 15 | new_revision=info[index+1].to_i |
|---|
| 16 | |
|---|
| 17 | # Iterate over each revision |
|---|
| 18 | Dir.chdir( rexml ) { |
|---|
| 19 | old_revision.upto( new_revision-1 ) { |rev| |
|---|
| 20 | newrev=rev+1 |
|---|
| 21 | # Get a diff and a log message |
|---|
| 22 | diff = `svn diff -r #{rev}:#{newrev}` |
|---|
| 23 | Dir.chdir( File.join("..",ruby) ) { |
|---|
| 24 | # Apply the diff |
|---|
| 25 | # Update the revision property |
|---|
| 26 | `svn propset rexml:main-repo-version #{newrev}` |
|---|
| 27 | # Commit the change with log message |
|---|
| 28 | `svn commit -m ` |
|---|
| 29 | } |
|---|
| 30 | } |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | =begin |
|---|
| 34 | svn diff --summarize -r 1252:1253 |
|---|
| 35 | A x |
|---|
| 36 | D x |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | Property changes on: bin/info.rb |
|---|
| 40 | ___________________________________________________________________ |
|---|
| 41 | Name: svn:executable |
|---|
| 42 | + * |
|---|
| 43 | =end |
|---|
| 44 | |
|---|
| 45 | |
|---|