Changeset 76255 in webkit
- Timestamp:
- Jan 20, 2011 9:11:18 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r76253 r76255 1 2011-01-19 Adam Roben <aroben@apple.com> 2 3 Convert paths in environment variables back to msys-style inside commit-log-editor 4 5 When this script gets run from inside git commit, msys-style paths in the environment will 6 have been turned into Windows-style paths with forward slashes. This screws up functions 7 like File::Spec->rel2abs, which seem to rely on $PWD having an msys-style path. We convert 8 the paths back to msys-style before doing anything else. 9 10 Fixes <http://webkit.org/b/48527> commit-log-editor uses full paths for section headers when 11 using msysgit's Perl and multiple ChangeLogs have been edited 12 13 Reviewed by David Kilzer. 14 15 * Scripts/commit-log-editor: Call fixEnvironment before doing anything else. 16 (fixEnvironment): Added. When run in msys in conjunction with git (i.e., when invoked from 17 inside git commit), convert Windows-style paths in the environment back to msys-style paths. 18 1 19 2011-01-20 Zoltan Horvath <zoltan@webkit.org> 2 20 -
trunk/Tools/Scripts/commit-log-editor
r66059 r76255 39 39 use webkitdirs; 40 40 41 sub fixEnvironment(); 41 42 sub normalizeLineEndings($$); 42 43 sub removeLongestCommonPrefixEndingInDoubleNewline(\%); … … 59 60 usage(); 60 61 } 62 63 fixEnvironment(); 61 64 62 65 my $baseDir = baseProductDir(); … … 283 286 unlink "$log.edit"; 284 287 288 sub fixEnvironment() 289 { 290 return unless isMsys() && isGit(); 291 292 # When this script gets run from inside git commit, msys-style paths in the 293 # environment will have been turned into Windows-style paths with forward 294 # slashes. This screws up functions like File::Spec->rel2abs, which seem to 295 # rely on $PWD having an msys-style path. We convert the paths back to 296 # msys-style here by transforming "c:/foo" to "/c/foo" (e.g.). See 297 # <http://webkit.org/b/48527>. 298 foreach my $key (keys %ENV) { 299 $ENV{$key} =~ s#^([[:alpha:]]):/#/$1/#; 300 } 301 } 302 285 303 sub normalizeLineEndings($$) 286 304 {
Note: See TracChangeset
for help on using the changeset viewer.