mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
[git_cl] Remove config from git_cl module.
No downstream repos use this functionality now, using instead the simpler, explicit, set_default_repo_location method. Bug: 1462728 Change-Id: Iaf3836b30234f0b798c53f27639ab19c1b134ac9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4669517 Auto-Submit: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This commit is contained in:
@@ -530,24 +530,24 @@ Args:
|
||||
|
||||
#### **class [GitClApi](/recipes/recipe_modules/git_cl/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
|
||||
|
||||
— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#39)(self, patch_url=None, \*\*kwargs):**
|
||||
— **def [get\_description](/recipes/recipe_modules/git_cl/api.py#36)(self, patch_url=None, \*\*kwargs):**
|
||||
|
||||
*** note
|
||||
**DEPRECATED**. Consider using gerrit.get_change_description instead.
|
||||
***
|
||||
|
||||
— **def [issue](/recipes/recipe_modules/git_cl/api.py#64)(self, \*\*kwargs):**
|
||||
— **def [issue](/recipes/recipe_modules/git_cl/api.py#61)(self, \*\*kwargs):**
|
||||
|
||||
— **def [set\_default\_repo\_location](/recipes/recipe_modules/git_cl/api.py#31)(self, path: Optional[Path]):**
|
||||
— **def [set\_default\_repo\_location](/recipes/recipe_modules/git_cl/api.py#28)(self, path: Optional[Path]):**
|
||||
|
||||
Sets the working directory where `git cl` will run, unless `cwd` from the
|
||||
context module has been set.
|
||||
|
||||
If you set `path` to None, this will remove the default.
|
||||
|
||||
— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#47)(self, description, patch_url=None, \*\*kwargs):**
|
||||
— **def [set\_description](/recipes/recipe_modules/git_cl/api.py#44)(self, description, patch_url=None, \*\*kwargs):**
|
||||
|
||||
— **def [upload](/recipes/recipe_modules/git_cl/api.py#57)(self, message, upload_args=None, \*\*kwargs):**
|
||||
— **def [upload](/recipes/recipe_modules/git_cl/api.py#54)(self, message, upload_args=None, \*\*kwargs):**
|
||||
### *recipe_modules* / [gitiles](/recipes/recipe_modules/gitiles)
|
||||
|
||||
[DEPS](/recipes/recipe_modules/gitiles/__init__.py#7): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/url][recipe_engine/recipe_modules/url]
|
||||
|
||||
@@ -21,9 +21,6 @@ class GitClApi(recipe_api.RecipeApi):
|
||||
name = name + ' (%s)' % kwargs.pop('suffix')
|
||||
|
||||
my_loc = self._default_repo_location
|
||||
if not my_loc and self.c: # pragma: no cover
|
||||
# fallback until all config usage is removed.
|
||||
my_loc = self.c.repo_location
|
||||
cmd = ['vpython3', self.repo_resource('git_cl.py'), subcmd] + args
|
||||
with self.m.context(cwd=self.m.context.cwd or my_loc):
|
||||
return self.m.step(name, cmd, **kwargs)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Copyright 2013 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import types
|
||||
|
||||
from recipe_engine.config import config_item_context, ConfigGroup, BadConf
|
||||
from recipe_engine.config import Single
|
||||
from recipe_engine.config_types import Path
|
||||
|
||||
|
||||
def BaseConfig(**_kwargs): # pragma: no cover
|
||||
return ConfigGroup(
|
||||
repo_location=Single(Path)
|
||||
)
|
||||
|
||||
config_ctx = config_item_context(BaseConfig)
|
||||
|
||||
@config_ctx()
|
||||
def basic(c): # pragma: no cover
|
||||
pass
|
||||
Reference in New Issue
Block a user