comparison mercurial/commands.py @ 28669:c4b727795d6a

bundle: avoid crash when no good changegroup version found When using treemanifests, only changegroup3 bundles can be created. However, there is currently no way of requesting a changegroup3 bundle, so we run into an assertion in changegroup.getbundler() when trying to get a changroup2 bundler. Let's avoid the traceback and print a short error message instead.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 25 Mar 2016 23:05:32 -0700
parents ae53ecc47414
children 2637d6ad3e61
comparison
equal deleted inserted replaced
28668:07f1fbf1f758 28669:c4b727795d6a
1397 base = ['null'] 1397 base = ['null']
1398 else: 1398 else:
1399 base = scmutil.revrange(repo, opts.get('base')) 1399 base = scmutil.revrange(repo, opts.get('base'))
1400 # TODO: get desired bundlecaps from command line. 1400 # TODO: get desired bundlecaps from command line.
1401 bundlecaps = None 1401 bundlecaps = None
1402 if cgversion not in changegroup.supportedoutgoingversions(repo):
1403 raise error.Abort(_("repository does not support bundle version %s") %
1404 cgversion)
1405
1402 if base: 1406 if base:
1403 if dest: 1407 if dest:
1404 raise error.Abort(_("--base is incompatible with specifying " 1408 raise error.Abort(_("--base is incompatible with specifying "
1405 "a destination")) 1409 "a destination"))
1406 common = [repo.lookup(rev) for rev in base] 1410 common = [repo.lookup(rev) for rev in base]