Changeset 46671 in webkit
- Timestamp:
- Aug 1, 2009 7:29:20 AM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r46670 r46671 1 2009-08-01 David Kilzer <ddkilzer@apple.com> 2 3 <http://webkit.org/b/18599> resolve-ChangeLogs doesn't work with relative paths 4 5 Reviewed by Eric Seidel. 6 7 * Scripts/resolve-ChangeLogs: Used chdirReturningRelativePath() 8 and determineVCSRoot() to change directories to the root of the 9 project before running the command and to provide a path for 10 removeChangeLogArguments() to make sure any ChangeLog arguments 11 on the command line are still found. 12 (canonicalRelativePath): Added. Returns a canonical path (e.g., 13 stripping 'dir/../' from the path) relative to the current 14 directory. 15 (removeChangeLogArguments): Added argument which contains a 16 relative path that must be prepended to any ChangeLog arguments. 17 Used canonicalRelativePath() and File::Spec->catfile() to 18 construct a normalized, relative path to each file. 19 1 20 2009-08-01 David Kilzer <ddkilzer@apple.com> 2 21 -
trunk/WebKitTools/Scripts/resolve-ChangeLogs
r46095 r46671 41 41 use VCSUtils; 42 42 43 sub canonicalRelativePath($); 43 44 sub conflictFiles($); 44 45 sub findChangeLog($); … … 50 51 sub mergeChanges($$$); 51 52 sub parseFixMerged($$;$); 52 sub removeChangeLogArguments( );53 sub removeChangeLogArguments($); 53 54 sub resolveChangeLog($); 54 55 sub resolveConflict($); … … 77 78 ); 78 79 79 my @changeLogFiles = removeChangeLogArguments(); 80 my $relativePath = chdirReturningRelativePath(determineVCSRoot()); 81 82 my @changeLogFiles = removeChangeLogArguments($relativePath); 80 83 81 84 if (!defined $fixMerged && scalar(@changeLogFiles) == 0) { … … 142 145 143 146 exit 0; 147 148 sub canonicalRelativePath($) 149 { 150 my ($originalPath) = @_; 151 my $absolutePath = Cwd::abs_path($originalPath); 152 return File::Spec->abs2rel($absolutePath); 153 } 144 154 145 155 sub conflictFiles($) … … 483 493 } 484 494 485 sub removeChangeLogArguments() 486 { 495 sub removeChangeLogArguments($) 496 { 497 my ($baseDir) = @_; 487 498 my @results = (); 488 499 489 500 for (my $i = 0; $i < scalar(@ARGV); ) { 490 my $file = findChangeLog( $ARGV[$i]);501 my $file = findChangeLog(canonicalRelativePath(File::Spec->catfile($baseDir, $ARGV[$i]))); 491 502 if (defined $file) { 492 503 splice(@ARGV, $i, 1);
Note: See TracChangeset
for help on using the changeset viewer.