Changeset 47923 in webkit


Ignore:
Timestamp:
Sep 1, 2009 3:24:36 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-09-01 Joseph Pecoraro <Joseph Pecoraro>

<http://webkit.org/b/28623> svn-[un]apply should change directories to the repository root before [un]applying

Reviewed by Eric Seidel.

Jump back and forth between the repository root directory (to apply) and the
directory the script was run from (to find the patch).

  • Scripts/svn-apply:
  • Scripts/svn-unapply:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r47899 r47923  
     12009-09-01  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        <http://webkit.org/b/28623> svn-[un]apply should change directories to the repository root before [un]applying
     4
     5        Reviewed by Eric Seidel.
     6
     7        Jump back and forth between the repository root directory (to apply) and the
     8        directory the script was run from (to find the patch).
     9
     10        * Scripts/svn-apply:
     11        * Scripts/svn-unapply:
     12
    1132009-08-31  Adam Roben  <aroben@apple.com>
    214
  • trunk/WebKitTools/Scripts/svn-apply

    r46742 r47923  
    122122);
    123123
     124my $pathScriptWasRunFrom = Cwd::getcwd();
     125my $pathForRepositoryRoot = determineVCSRoot();
     126
    124127my %checkedDirectories;
    125128my %copiedFiles;
     
    227230{
    228231    my ($patch, $fullPath, $options) = @_;
     232    chdir $pathForRepositoryRoot;
    229233    $options = [] if (! $options);
    230234    my $command = "patch " . join(" ", "-p0", @{$options});
     
    232236    print PATCH $patch;
    233237    close PATCH;
     238    chdir $pathScriptWasRunFrom;
    234239
    235240    my $exitCode = $? >> 8;
  • trunk/WebKitTools/Scripts/svn-unapply

    r46742 r47923  
    6666use Getopt::Long;
    6767
     68use FindBin;
     69use lib $FindBin::Bin;
     70use VCSUtils;
     71
    6872sub checksum($);
    6973sub fixChangeLogPatch($);
     
    8084    exit 1;
    8185}
     86
     87my $pathScriptWasRunFrom = Cwd::getcwd();
     88my $pathForRepositoryRoot = determineVCSRoot();
    8289
    8390my @copiedFiles;
     
    134141}
    135142
    136 revertDirectories();
     143if (isSVN()) {
     144    revertDirectories();
     145}
    137146
    138147exit 0;
     
    290299sub revertDirectories()
    291300{
     301    chdir $pathForRepositoryRoot;
    292302    my %checkedDirectories;
    293303    foreach my $path (reverse sort keys %directoriesToCheck) {
     
    354364{
    355365    my ($patch, $fullPath, $options) = @_;
     366    chdir $pathForRepositoryRoot;
    356367    $options = [] if (! $options);
    357368    my $command = "patch " . join(" ", "-p0", "-R", @{$options});
     
    359370    print PATCH $patch;
    360371    close PATCH;
     372    chdir $pathScriptWasRunFrom;
    361373}
    362374
Note: See TracChangeset for help on using the changeset viewer.