Changeset 43601 in webkit


Ignore:
Timestamp:
May 12, 2009 5:31:47 PM (15 years ago)
Author:
ddkilzer@apple.com
Message:

Bug 21418: resolve-ChangeLogs should have a --continue option which does git rebase --continue

<https://bugs.webkit.org/show_bug.cgi?id=21418>

Reviewed by Darin Adler.

Scripts/resolve-ChangeLogs: Added -ccontinue switch that

runs "git rebase --continue" before exiting the script.
(hasGitUnmergedFiles): Added. Returns true if there are
unmerged files in the git repository.

Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r43497 r43601  
     12009-05-12  David Kilzer  <ddkilzer@apple.com>
     2
     3        Bug 21418: resolve-ChangeLogs should have a --continue option which does git rebase --continue
     4
     5        <https://bugs.webkit.org/show_bug.cgi?id=21418>
     6
     7        Reviewed by Darin Adler.
     8
     9        * Scripts/resolve-ChangeLogs: Added -c|--continue switch that
     10        runs "git rebase --continue" before exiting the script.
     11        (hasGitUnmergedFiles): Added.  Returns true if there are
     12        unmerged files in the git repository.
     13
    1142009-05-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    215
  • trunk/WebKitTools/Scripts/resolve-ChangeLogs

    r42146 r43601  
    4747sub fixMergedChangeLogs($;@);
    4848sub fixOneMergedChangeLog($);
     49sub hasGitUnmergedFiles();
    4950sub mergeChanges($$$);
    5051sub parseFixMerged($$;$);
     
    6263
    6364my $fixMerged;
     65my $gitRebaseContinue = 0;
    6466my $printWarnings = 1;
    6567my $showHelp;
    6668
    6769my $getOptionsResult = GetOptions(
     70    'c|continue!'    => \$gitRebaseContinue,
    6871    'f|fix-merged:s' => \&parseFixMerged,
    6972    'h|help'         => \$showHelp,
     
    8386    print STDERR "ERROR: No ChangeLog files listed on command-line or found unmerged.\n";
    8487    undef $getOptionsResult;
     88} elsif (defined $gitRebaseContinue && !$isGit) {
     89    print STDERR "ERROR: --continue may only be used with a git repository\n";
     90    undef $getOptionsResult;
    8591} elsif (defined $fixMerged && !$isGit) {
    8692    print STDERR "ERROR: --fix-merged may only be used with a git repository\n";
     
    9298    print STDERR <<__END__;
    9399Usage: @{[ basename($0) ]} [options] [path/to/ChangeLog] [path/to/another/ChangeLog ...]
     100  -c|--[no-]continue               run "git rebase --continue" after fixing ChangeLog
     101                                   entries (default: --no-continue)
    94102  -f|--fix-merged [revision-range] fix git-merged ChangeLog entries; if a revision-range
    95103                                   is specified, run git filter-branch on the range
     
    119127    print STDERR "ERROR: Unknown combination of switches and arguments.\n";
    120128    usageAndExit();
     129}
     130
     131if ($gitRebaseContinue) {
     132    if (hasGitUnmergedFiles()) {
     133        print "Unmerged files; skipping '$GIT rebase --continue'.";
     134    } else {
     135        print "Running '$GIT rebase --continue'...\n";
     136        print `$GIT rebase --continue`;
     137    }
    121138}
    122139
     
    381398}
    382399
     400sub hasGitUnmergedFiles()
     401{
     402    my $output = `$GIT ls-files --unmerged`;
     403    return $output ne "";
     404}
     405
    383406sub mergeChanges($$$)
    384407{
Note: See TracChangeset for help on using the changeset viewer.