Commit e72279d2 authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Keep warning about unversioned trees until removed

Restore previous behavior and keep emitting a warning when an existing
gclient entry is not longer part of the client. Additionally, suggest
the usage of `gclient sync -D` to automatically remove them.

Change-Id: I62d4662ae4d0886d340230019419b68debffc5ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1483031Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: 's avatarMichael Moss <mmoss@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
parent 7e7523be
......@@ -1675,9 +1675,23 @@ it or fix the checkout.
(modified_files and not self._options.force)):
# There are modified files in this entry. Keep warning until
# removed.
print(('\nWARNING: \'%s\' is no longer part of this client. '
'It is recommended that you manually remove it.\n') %
entry_fixed)
self.add_dependency(
GitDependency(
parent=self,
name=entry,
url=prev_url,
managed=False,
custom_deps={},
custom_vars={},
custom_hooks=[],
deps_file=None,
should_process=True,
should_recurse=False,
relative=None,
condition=None))
print(('\nWARNING: \'%s\' is no longer part of this client.\n'
'It is recommended that you manually remove it or use '
'\'gclient sync -D\' next time.') % entry_fixed)
else:
# Delete the entry
print('\n________ deleting \'%s\' in \'%s\'' % (
......
......@@ -222,7 +222,8 @@ class GitWrapper(SCMWrapper):
def __init__(self, url=None, *args, **kwargs):
"""Removes 'git+' fake prefix from git URL."""
if url.startswith('git+http://') or url.startswith('git+https://'):
if url and (url.startswith('git+http://') or
url.startswith('git+https://')):
url = url[4:]
SCMWrapper.__init__(self, url, *args, **kwargs)
filter_kwargs = { 'time_throttle': 1, 'out_fh': self.out_fh }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment