Changeset 46669 in webkit
- Timestamp:
- Aug 1, 2009 7:23:34 AM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r46664 r46669 1 2009-08-01 David Kilzer <ddkilzer@apple.com> 2 3 Implement VCSUtils::determineVCSRoot() 4 5 Reviewed by Eric Seidel. 6 7 Step 1 to fix: 8 <http://webkit.org/b/18599> resolve-ChangeLogs doesn't work with relative paths 9 10 * Scripts/VCSUtils.pm: Removed reference to webkitdirs module. 11 (VCSUtils::EXPORT): Added &determineVCSRoot. Realphabetized. 12 (VCSUtils::determineGitRoot): Added. Based on code in 13 commit-log-editor. 14 (VCSUtils::determineVCSRoot): Implemented using 15 determineGitRoot() and determineSVNRoot(). 16 * Scripts/commit-log-editor: Replaced use of 17 topLevelSourceDirectory() with determineVCSRoot(). Resorted 18 use statements. 19 (topLevelSourceDirectory): Removed. 20 1 21 2009-07-31 Daniel Bates <dbates@intudata.com> 2 22 -
trunk/WebKitTools/Scripts/VCSUtils.pm
r46236 r46669 1 # Copyright (C) 2007 Apple Inc. All rights reserved.1 # Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 29 29 use strict; 30 30 use warnings; 31 32 use File::Basename; 31 33 use File::Spec; 32 use webkitdirs;33 34 34 35 BEGIN { … … 37 38 $VERSION = 1.00; 38 39 @ISA = qw(Exporter); 39 @EXPORT = qw(& isGitDirectory &isGit &isSVNDirectory &isSVN &determineSVNRoot&makeFilePathRelative);40 @EXPORT = qw(&determineSVNRoot &determineVCSRoot &isGit &isGitDirectory &isSVN &isSVNDirectory &makeFilePathRelative); 40 41 %EXPORT_TAGS = ( ); 41 42 @EXPORT_OK = (); … … 103 104 $isSVN = isSVNDirectory("."); 104 105 return $isSVN; 106 } 107 108 sub determineGitRoot() 109 { 110 chomp(my $gitDir = `git rev-parse --git-dir`); 111 return dirname($gitDir); 105 112 } 106 113 … … 140 147 } 141 148 149 sub determineVCSRoot() 150 { 151 if (isGit()) { 152 return determineGitRoot(); 153 } 154 if (isSVN()) { 155 return determineSVNRoot(); 156 } 157 die "Unable to determine VCS root"; 158 } 159 142 160 sub svnRevisionForDirectory($) 143 161 { -
trunk/WebKitTools/Scripts/commit-log-editor
r46453 r46669 1 1 #!/usr/bin/perl -w 2 2 3 # Copyright (C) 2006, 2007 Apple Inc. All rights reserved.3 # Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 4 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 5 5 # … … 35 35 use FindBin; 36 36 use lib $FindBin::Bin; 37 use Term::ReadKey; 37 38 use VCSUtils; 38 39 use webkitdirs; 39 use Term::ReadKey;40 40 41 41 sub normalizeLineEndings($$); … … 126 126 exec $editor, @ARGV if $existingLog && $keepExistingLog; 127 127 128 my $topLevel = topLevelSourceDirectory();128 my $topLevel = determineVCSRoot(); 129 129 130 130 my %changeLogSort; … … 221 221 unlink "$log.edit"; 222 222 223 sub topLevelSourceDirectory224 {225 if (isGit()) {226 chomp(my $gitDir = `git rev-parse --git-dir`);227 return dirname($gitDir);228 } elsif (isSVN()) {229 return determineSVNRoot();230 }231 }232 233 223 sub normalizeLineEndings($$) 234 224 {
Note: See TracChangeset
for help on using the changeset viewer.