Changeset 56993 in webkit


Ignore:
Timestamp:
Apr 2, 2010 2:20:52 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-02 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

create-rollout doesn't fill out ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=37010

The contract between apply_reverse_diff and PrepareChangeLogForRevert
was unclear. I broke filling out the ChangeLog during rollout earlier
when I changed apply_reverse_diff to revert the ChangeLogs because
PrepareChangeLogForRevert thought that it was supposed to do that.
I've now taught PrepareChangeLogsForRevert the new contract.

It's unclear to me how to test this change because it's essentially an
integration issue that requires the file system. At some point we
should think about a testing strategy for integration. As the system
becomes larger, we're running into more of these issues.

  • Scripts/webkitpy/common/checkout/api.py:
  • Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56992 r56993  
     12010-04-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        create-rollout doesn't fill out ChangeLog
     6        https://bugs.webkit.org/show_bug.cgi?id=37010
     7
     8        The contract between apply_reverse_diff and PrepareChangeLogForRevert
     9        was unclear.  I broke filling out the ChangeLog during rollout earlier
     10        when I changed apply_reverse_diff to revert the ChangeLogs because
     11        PrepareChangeLogForRevert thought that it was supposed to do that.
     12        I've now taught PrepareChangeLogsForRevert the new contract.
     13
     14        It's unclear to me how to test this change because it's essentially an
     15        integration issue that requires the file system.  At some point we
     16        should think about a testing strategy for integration.  As the system
     17        becomes larger, we're running into more of these issues.
     18
     19        * Scripts/webkitpy/common/checkout/api.py:
     20        * Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
     21
    1222010-04-02  Adam Barth  <abarth@webkit.org>
    223
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/api.py

    r56964 r56993  
    128128        self._scm.apply_reverse_diff(revision)
    129129
    130         # We don't want to remove the old ChangeLog entry.
     130        # We revert the ChangeLogs because removing lines from a ChangeLog
     131        # doesn't make sense.  ChangeLogs are append only.
    131132        changelog_paths = self.modified_changelogs()
    132133        if len(changelog_paths):
  • trunk/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py

    r56601 r56993  
    3535class PrepareChangeLogForRevert(AbstractStep):
    3636    def run(self, state):
    37         # First, discard the ChangeLog changes from the rollout.
    38         os.chdir(self._tool.scm().checkout_root)
    39         changelog_paths = self._tool.checkout().modified_changelogs()
    40         self._tool.scm().revert_files(changelog_paths)
    41 
    42         # Second, make new ChangeLog entries for this rollout.
    4337        # This could move to prepare-ChangeLog by adding a --revert= option.
    4438        self._run_script("prepare-ChangeLog")
     39        changelog_paths = self._tool.checkout().modified_changelogs()
    4540        bug_url = self._tool.bugs.bug_url_for_bug_id(state["bug_id"]) if state["bug_id"] else None
    4641        for changelog_path in changelog_paths:
Note: See TracChangeset for help on using the changeset viewer.