Changeset 273142 in webkit
- Timestamp:
- Feb 19, 2021 9:33:33 AM (3 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r273133 r273142 1 2021-02-19 Jonathan Bedard <jbedard@apple.com> 2 3 [webkitscmpy] Add clean command 4 https://bugs.webkit.org/show_bug.cgi?id=222135 5 <rdar://problem/74496504> 6 7 Reviewed by Aakash Jain. 8 9 * Scripts/libraries/webkitscmpy/setup.py: Bump version. 10 * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. 11 * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: 12 (Git): 13 (Git.clean): Throw away all local changes. 14 * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py: 15 (Svn): 16 (Svn.clean): Throw away all local changes, delete untracked files. 17 * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: 18 (main): Add Clean command 19 * Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py: Added. 20 (Clean): Command to remove all local changes from the current checkout. 21 1 22 2021-02-19 Jiewen Tan <jiewen_tan@apple.com> 2 23 -
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
r273005 r273142 30 30 setup( 31 31 name='webkitscmpy', 32 version='0. 9.9',32 version='0.10.0', 33 33 description='Library designed to interact with git and svn repositories.', 34 34 long_description=readme(), -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
r273005 r273142 47 47 ) 48 48 49 version = Version(0, 9, 9)49 version = Version(0, 10, 0) 50 50 51 51 AutoInstall.register(Package('entrypoints', Version(0, 3, 0))) -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
r272581 r273142 334 334 ], cwd=self.root_path).returncode 335 335 return code 336 337 def clean(self): 338 return run([ 339 self.executable(), 'reset', 'HEAD', '--hard', 340 ], cwd=self.root_path).returncode -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
r271455 r273142 27 27 import os 28 28 import re 29 import shutil 29 30 import subprocess 30 31 import sys … … 400 401 def pull(self): 401 402 return run([self.executable(), 'up'], cwd=self.root_path).returncode 403 404 def clean(self): 405 result = run([ 406 self.executable(), 'revert', '-R', self.root_path, 407 ], cwd=self.root_path).returncode 408 if result: 409 return result 410 411 for line in reversed(run([self.executable(), 'status'], cwd=self.root_path, capture_output=True, encoding='utf-8').stdout.splitlines()): 412 candidate = line.split(' ') 413 if candidate[0] != '?': 414 continue 415 path = os.path.join(self.root_path, ' '.join(candidate[1:])) 416 if os.path.isdir(path): 417 shutil.rmtree(path, ignore_errors=True) 418 elif os.path.exists(path): 419 os.remove(path) 420 return 0 -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
r271340 r273142 29 29 30 30 from .canonicalize import Canonicalize 31 from .clean import Clean 31 32 from .command import Command 32 33 from .checkout import Checkout … … 57 58 subparsers = parser.add_subparsers(help='sub-command help') 58 59 59 programs = [Find, Checkout, Canonicalize, Pull ]60 programs = [Find, Checkout, Canonicalize, Pull, Clean] 60 61 if subversion: 61 62 programs.append(SetupGitSvn)
Note: See TracChangeset
for help on using the changeset viewer.