Changeset 85427 in webkit


Ignore:
Timestamp:
May 1, 2011 12:20:45 PM (13 years ago)
Author:
eric@webkit.org
Message:

2011-05-01 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Move scm.py into its own module in preparation for splitting it up
https://bugs.webkit.org/show_bug.cgi?id=59884

  • Scripts/webkitpy/common/checkout/scm/init.py: Added.
  • Scripts/webkitpy/common/checkout/scm/scm.py: Moved.
  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Moved.
  • Scripts/webkitpy/test/main.py:
Location:
trunk/Tools
Files:
2 added
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r85424 r85427  
     12011-05-01  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Move scm.py into its own module in preparation for splitting it up
     6        https://bugs.webkit.org/show_bug.cgi?id=59884
     7
     8        * Scripts/webkitpy/common/checkout/scm/__init__.py: Added.
     9        * Scripts/webkitpy/common/checkout/scm/scm.py: Moved.
     10        * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Moved.
     11        * Scripts/webkitpy/test/main.py:
     12
    1132011-05-01  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py

    r85425 r85427  
    11# Copyright (c) 2009, Google Inc. All rights reserved.
    22# Copyright (c) 2009 Apple Inc. All rights reserved.
    3 # 
     3#
    44# Redistribution and use in source and binary forms, with or without
    55# modification, are permitted provided that the following conditions are
    66# met:
    7 # 
     7#
    88#     * Redistributions of source code must retain the above copyright
    99# notice, this list of conditions and the following disclaimer.
     
    1515# contributors may be used to endorse or promote products derived from
    1616# this software without specific prior written permission.
    17 # 
     17#
    1818# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    1919# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     
    8484    if SVN.in_working_directory(absolute_path):
    8585        return SVN(cwd=absolute_path, patch_directories=patch_directories)
    86    
     86
    8787    if Git.in_working_directory(absolute_path):
    8888        return Git(cwd=absolute_path)
    89    
     89
    9090    return None
    9191
     
    365365    def in_working_directory(path):
    366366        return os.path.isdir(os.path.join(path, '.svn'))
    367    
     367
    368368    @classmethod
    369369    def find_uuid(cls, path):
     
    696696        # FIXME: This should probably use cwd=self.checkout_root
    697697        self.run(['git', 'reset', '--hard', self.remote_branch_ref()])
    698    
     698
    699699    def local_commits(self):
    700700        # FIXME: This should probably use cwd=self.checkout_root
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py

    r85425 r85427  
    510510@@ -1,5 +1,13 @@
    511511 2009-10-26  Eric Seidel  <eric@webkit.org>
    512  
     512
    513513+        Reviewed by NOBODY (OOPS!).
    514514+
     
    520520+
    521521         Reviewed by Foo Bar.
    522  
     522
    523523         Most awesome change ever.
    524524"""
     
    536536+++ ChangeLog   (working copy)
    537537@@ -2,6 +2,14 @@
    538  
     538
    539539         Reviewed by Foo Bar.
    540  
     540
    541541+        Second most awesome change ever.
    542542+
     
    548548+
    549549         Most awesome change ever.
    550  
     550
    551551         * scm_unittest.py:
    552552"""
     
    10141014    def test_commitish_parsing(self):
    10151015        scm = detect_scm_system(self.git_checkout_path)
    1016    
     1016
    10171017        # Multiple revisions are cherry-picked.
    10181018        self.assertEqual(len(scm.commit_ids_from_commitish_arguments(['HEAD~2'])), 1)
    10191019        self.assertEqual(len(scm.commit_ids_from_commitish_arguments(['HEAD', 'HEAD~2'])), 2)
    1020    
     1020
    10211021        # ... is an invalid range specifier
    10221022        self.assertRaises(ScriptError, scm.commit_ids_from_commitish_arguments, ['trunk...HEAD'])
  • trunk/Tools/Scripts/webkitpy/test/main.py

    r79181 r85427  
    9797        """Run the unit tests in all *_unittest.py modules in webkitpy.
    9898
    99         This method excludes "webkitpy.common.checkout.scm_unittest" unless
     99        This method excludes "webkitpy.common.checkout.scm.scm_unittest" unless
    100100        the --all option is the second element of sys_argv.
    101101
     
    141141            sys.argv.remove("--all")
    142142        else:
    143             excluded_module = "webkitpy.common.checkout.scm_unittest"
     143            excluded_module = "webkitpy.common.checkout.scm.scm_unittest"
    144144            _log.info("Excluding: %s (use --all to include)" % excluded_module)
    145145            modules.remove(excluded_module)
     
    147147        if sys.platform == 'win32':
    148148            modules = filter(self._win32_blacklist, modules)
     149
     150        # unittest.main has horrible error reporting when module imports are bad
     151        # so we test import here to make debugging bad imports much easier.
     152        for module in modules:
     153            __import__(module)
    149154
    150155        sys_argv.extend(modules)
Note: See TracChangeset for help on using the changeset viewer.