[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>
changes/17/4669517/3
Robert Iannucci 2 years ago committed by LUCI CQ
parent 11d847f07b
commit 247429efd9

@ -530,24 +530,24 @@ Args:
#### **class [GitClApi](/recipes/recipe_modules/git_cl/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&mdash; **def [get\_description](/recipes/recipe_modules/git_cl/api.py#39)(self, patch_url=None, \*\*kwargs):**
&mdash; **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.
***
&mdash; **def [issue](/recipes/recipe_modules/git_cl/api.py#64)(self, \*\*kwargs):**
&mdash; **def [issue](/recipes/recipe_modules/git_cl/api.py#61)(self, \*\*kwargs):**
&mdash; **def [set\_default\_repo\_location](/recipes/recipe_modules/git_cl/api.py#31)(self, path: Optional[Path]):**
&mdash; **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.
&mdash; **def [set\_description](/recipes/recipe_modules/git_cl/api.py#47)(self, description, patch_url=None, \*\*kwargs):**
&mdash; **def [set\_description](/recipes/recipe_modules/git_cl/api.py#44)(self, description, patch_url=None, \*\*kwargs):**
&mdash; **def [upload](/recipes/recipe_modules/git_cl/api.py#57)(self, message, upload_args=None, \*\*kwargs):**
&mdash; **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
Loading…
Cancel
Save