summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-29 14:14:11 -0700
committerSimon Glass <sjg@chromium.org>2022-02-09 12:26:12 -0700
commit0157b187f45c00ffb3e85c7f5c33808454243608 (patch)
tree5245564c559d091a818bd06688cd116a009abe94 /tools/buildman
parent967af26b6aedc21ccb51273fbbbb898ad8c4305f (diff)
patman: Convert camel case in gitutil.py
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/builder.py12
-rw-r--r--tools/buildman/builderthread.py2
-rw-r--r--tools/buildman/control.py10
-rw-r--r--tools/buildman/func_test.py4
4 files changed, 14 insertions, 14 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 94f843e2a9..502ac7b274 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -442,7 +442,7 @@ class Builder:
"""
self.commit = commit
if checkout and self.checkout:
- gitutil.Checkout(commit.hash)
+ gitutil.checkout(commit.hash)
def Make(self, commit, brd, stage, cwd, *args, **kwargs):
"""Run make
@@ -1631,7 +1631,7 @@ class Builder:
# it but need to fetch from src_dir.
Print('\rFetching repo for thread %d' % thread_num,
newline=False)
- gitutil.Fetch(git_dir, thread_dir)
+ gitutil.fetch(git_dir, thread_dir)
terminal.PrintClear()
elif os.path.isfile(git_dir):
# This is a worktree of the src_dir repo, we don't need to
@@ -1645,12 +1645,12 @@ class Builder:
elif setup_git == 'worktree':
Print('\rChecking out worktree for thread %d' % thread_num,
newline=False)
- gitutil.AddWorktree(src_dir, thread_dir)
+ gitutil.add_worktree(src_dir, thread_dir)
terminal.PrintClear()
elif setup_git == 'clone' or setup_git == True:
Print('\rCloning repo for thread %d' % thread_num,
newline=False)
- gitutil.Clone(src_dir, thread_dir)
+ gitutil.clone(src_dir, thread_dir)
terminal.PrintClear()
else:
raise ValueError("Can't setup git repo with %s." % setup_git)
@@ -1670,12 +1670,12 @@ class Builder:
builderthread.Mkdir(self._working_dir)
if setup_git and self.git_dir:
src_dir = os.path.abspath(self.git_dir)
- if gitutil.CheckWorktreeIsAvailable(src_dir):
+ if gitutil.check_worktree_is_available(src_dir):
setup_git = 'worktree'
# If we previously added a worktree but the directory for it
# got deleted, we need to prune its files from the repo so
# that we can check out another in its place.
- gitutil.PruneWorktrees(src_dir)
+ gitutil.prune_worktrees(src_dir)
else:
setup_git = 'clone'
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 90099eee04..7522ff62de 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -219,7 +219,7 @@ class BuilderThread(threading.Thread):
commit = self.builder.commits[commit_upto]
if self.builder.checkout:
git_dir = os.path.join(work_dir, '.git')
- gitutil.Checkout(commit.hash, git_dir, work_dir,
+ gitutil.checkout(commit.hash, git_dir, work_dir,
force=True)
else:
commit = 'current'
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index ebab126adf..2c25fd7066 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -140,7 +140,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
)
return 0
- gitutil.Setup()
+ gitutil.setup()
col = terminal.Color()
options.git_dir = os.path.join(options.git, '.git')
@@ -236,10 +236,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
count = 1
else:
if has_range:
- count, msg = gitutil.CountCommitsInRange(options.git_dir,
+ count, msg = gitutil.count_commits_in_range(options.git_dir,
options.branch)
else:
- count, msg = gitutil.CountCommitsInBranch(options.git_dir,
+ count, msg = gitutil.count_commits_in_branch(options.git_dir,
options.branch)
if count is None:
sys.exit(col.Color(col.RED, msg))
@@ -276,9 +276,9 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
if has_range:
range_expr = options.branch
else:
- range_expr = gitutil.GetRangeInBranch(options.git_dir,
+ range_expr = gitutil.get_range_in_branch(options.git_dir,
options.branch)
- upstream_commit = gitutil.GetUpstream(options.git_dir,
+ upstream_commit = gitutil.get_upstream(options.git_dir,
options.branch)
series = patchstream.get_metadata_for_list(upstream_commit,
options.git_dir, 1, series=None, allow_overwrite=True)
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 4beca8aa7d..b48dd1671d 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -267,11 +267,11 @@ class TestFunctional(unittest.TestCase):
def testGitSetup(self):
"""Test gitutils.Setup(), from outside the module itself"""
command.test_result = command.CommandResult(return_code=1)
- gitutil.Setup()
+ gitutil.setup()
self.assertEqual(gitutil.use_no_decorate, False)
command.test_result = command.CommandResult(return_code=0)
- gitutil.Setup()
+ gitutil.setup()
self.assertEqual(gitutil.use_no_decorate, True)
def _HandleCommandGitLog(self, args):