# HG changeset patch # User Tooru Fujisawa # Date 1552982527 0 # Tue Mar 19 08:02:07 2019 +0000 # Node ID da0f31d8e52c92b8cb2a6d705f7e10afcffddfc0 # Parent 993ec957f731e701d4b2984590dbc6a24f734d9c Bug 1535243 - Provide reference for mercurial bundle when hg pull fails in bootstrap. r=glandium Differential Revision: https://phabricator.services.mozilla.com/D23458 diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py --- a/python/mozboot/mozboot/bootstrap.py +++ b/python/mozboot/mozboot/bootstrap.py @@ -147,16 +147,24 @@ Your choice: ''' CLONE_VCS_NOT_EMPTY_FALLBACK_FAILED = ''' ERROR! Destination directory '{}' is not empty and '{}' exists. ''' CLONE_VCS_NOT_DIR = ''' ERROR! Destination '{}' exists but is not a directory. ''' +CLONE_MERCURIAL_PULL_FAIL = ''' +Failed to pull from hg.mozilla.org. + +This is most likely because of unstable network connection. +Try running `hg pull https://hg.mozilla.org/mozilla-unified` manually, or +download mercurial bundle and use it: +https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial/Bundles''' + DEBIAN_DISTROS = ( 'Debian', 'debian', 'Ubuntu', # Most Linux Mint editions are based on Ubuntu. One is based on Debian. # The difference is reported in dist_id from platform.linux_distribution. # But it doesn't matter since we share a bootstrapper between Debian and # Ubuntu. @@ -538,18 +546,17 @@ def hg_clone_firefox(hg, dest): # to bound revlog read time. fh.write('[format]\n') fh.write('# This is necessary to keep performance in check\n') fh.write('maxchainlen = 10000\n') res = subprocess.call([hg, 'pull', 'https://hg.mozilla.org/mozilla-unified'], cwd=dest) print('') if res: - print('error pulling; try running `hg pull https://hg.mozilla.org/mozilla-unified` ' - 'manually') + print(CLONE_MERCURIAL_PULL_FAIL) return False print('updating to "central" - the development head of Gecko and Firefox') res = subprocess.call([hg, 'update', '-r', 'central'], cwd=dest) if res: print('error updating; you will need to `hg update` manually') print('Firefox source code available at %s' % dest)