Bug 1164812 - mach mercurial-setup: Always mark the v-c-t repo as needing update

Currently we only mark the version-control-tools repo as needing updating, if
we did not pass a path param to prompt_external_extension(). This is because if
no path is passed, the extension is used from the version-control-tools repo,
and so if _no_ path is passed, it's presumed the extension is external to the
repo. However this is not always the case - eg if we need to specify a specific
file for an extension (vs the entire directory), we have to do so be passing in
the path. We hit this case for reviewboard.

With this change, we always mark the version-control-tools repo as needing an
update, no matter where the extension was located.
This commit is contained in:
Ed Morley 2015-05-19 09:41:38 +01:00
Родитель 18e0893b16
Коммит 7f51884ce9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -406,11 +406,11 @@ class MercurialSetupWizard(object):
if not self._prompt_yn(prompt_text):
print('')
return
print('Activated %s extension.\n' % name)
if not path:
path = os.path.join(self.vcs_tools_dir, 'hgext', name)
self.update_vcs_tools = True
self.update_vcs_tools = True
c.activate_extension(name, path)
print('Activated %s extension.\n' % name)
def _prompt(self, msg, allow_empty=False):
print(msg)