diff --git a/gclient.py b/gclient.py index a60d33134..2c497f712 100755 --- a/gclient.py +++ b/gclient.py @@ -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\'' % ( diff --git a/gclient_scm.py b/gclient_scm.py index e102e8073..c9c26bd75 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -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 }