Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Chromium_Depot_tools
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
Chromium_Depot_tools
Commits
0b7cf885
Commit
0b7cf885
authored
Aug 26, 2016
by
hinoka
Committed by
Commit bot
Aug 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Deps2Git references from bot_update.py
BUG= Review-Url:
https://codereview.chromium.org/2283043002
parent
5224ece2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
63 deletions
+0
-63
bot_update.py
recipe_modules/bot_update/resources/bot_update.py
+0
-63
No files found.
recipe_modules/bot_update/resources/bot_update.py
View file @
0b7cf885
...
...
@@ -351,11 +351,6 @@ GIT_MASTERS += internal_data.get('GIT_MASTERS', [])
# How many times to try before giving up.
ATTEMPTS
=
5
# Find deps2git
DEPS2GIT_DIR_PATH
=
path
.
join
(
SCRIPTS_DIR
,
'tools'
,
'deps2git'
)
DEPS2GIT_PATH
=
path
.
join
(
DEPS2GIT_DIR_PATH
,
'deps2git.py'
)
S2G_INTERNAL_PATH
=
path
.
join
(
SCRIPTS_DIR
,
'tools'
,
'deps2git_internal'
,
'svn_to_git_internal.py'
)
GIT_CACHE_PATH
=
path
.
join
(
DEPOT_TOOLS_DIR
,
'git_cache.py'
)
# Find the patch tool.
...
...
@@ -811,59 +806,6 @@ def get_git_hash(revision, branch, sln_dir):
(
revision
,
sln_dir
))
def
_last_commit_for_file
(
filename
,
repo_base
):
cmd
=
[
'log'
,
'--format=
%
H'
,
'--max-count=1'
,
'--'
,
filename
]
return
git
(
*
cmd
,
cwd
=
repo_base
)
.
strip
()
def
need_to_run_deps2git
(
repo_base
,
deps_file
,
deps_git_file
):
"""Checks to see if we need to run deps2git.
Returns True if there was a DEPS change after the last .DEPS.git update
or if DEPS has local modifications.
"""
# See if DEPS is dirty
deps_file_status
=
git
(
'status'
,
'--porcelain'
,
deps_file
,
cwd
=
repo_base
)
.
strip
()
if
deps_file_status
and
deps_file_status
.
startswith
(
'M '
):
return
True
last_known_deps_ref
=
_last_commit_for_file
(
deps_file
,
repo_base
)
last_known_deps_git_ref
=
_last_commit_for_file
(
deps_git_file
,
repo_base
)
merge_base_ref
=
git
(
'merge-base'
,
last_known_deps_ref
,
last_known_deps_git_ref
,
cwd
=
repo_base
)
.
strip
()
# If the merge base of the last DEPS and last .DEPS.git file is not
# equivilent to the hash of the last DEPS file, that means the DEPS file
# was committed after the last .DEPS.git file.
return
last_known_deps_ref
!=
merge_base_ref
def
ensure_deps2git
(
solution
,
shallow
,
git_cache_dir
):
repo_base
=
path
.
join
(
os
.
getcwd
(),
solution
[
'name'
])
deps_file
=
path
.
join
(
repo_base
,
'DEPS'
)
deps_git_file
=
path
.
join
(
repo_base
,
'.DEPS.git'
)
if
(
not
git
(
'ls-files'
,
'DEPS'
,
cwd
=
repo_base
)
.
strip
()
or
not
git
(
'ls-files'
,
'.DEPS.git'
,
cwd
=
repo_base
)
.
strip
()):
return
print
'Checking if
%
s is newer than
%
s'
%
(
deps_file
,
deps_git_file
)
if
not
need_to_run_deps2git
(
repo_base
,
deps_file
,
deps_git_file
):
return
print
'===DEPS file modified, need to run deps2git==='
cmd
=
[
sys
.
executable
,
DEPS2GIT_PATH
,
'--workspace'
,
os
.
getcwd
(),
'--cache_dir'
,
git_cache_dir
,
'--deps'
,
deps_file
,
'--out'
,
deps_git_file
]
if
'chrome-internal.googlesource'
in
solution
[
'url'
]:
cmd
.
extend
([
'--extra-rules'
,
S2G_INTERNAL_PATH
])
if
shallow
:
cmd
.
append
(
'--shallow'
)
call
(
*
cmd
)
def
emit_log_lines
(
name
,
lines
):
for
line
in
lines
.
splitlines
():
print
'@@@STEP_LOG_LINE@
%
s@
%
s@@@'
%
(
name
,
line
)
...
...
@@ -1360,11 +1302,6 @@ def ensure_checkout(solutions, revisions, first_sln, target_os, target_os_only,
apply_gerrit_ref
(
gerrit_repo
,
gerrit_ref
,
patch_root
,
gerrit_reset
,
True
)
if
not
buildspec
:
# Run deps2git if there is a DEPS change after the last .DEPS.git commit.
for
solution
in
solutions
:
ensure_deps2git
(
solution
,
shallow
,
git_cache_dir
)
# Ensure our build/ directory is set up with the correct .gclient file.
gclient_configure
(
solutions
,
target_os
,
target_os_only
,
git_cache_dir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment