comparison mercurial/commands.py @ 37768:5527aa808dea

bundlespec: drop externalnames flag Always provide the human readable version of compression and version. Add the translated wire format name in the new wirecompression and wireversion fields. Differential Revision: https://phab.mercurial-scm.org/D3392
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 17 Apr 2018 02:41:25 +0200
parents 9b3a348c9b2f
children 6a7ff5816c5f
comparison
equal deleted inserted replaced
37767:44d1959acb3b 37768:5527aa808dea
1243 1243
1244 if not outgoing.missing: 1244 if not outgoing.missing:
1245 scmutil.nochangesfound(ui, repo, not base and outgoing.excluded) 1245 scmutil.nochangesfound(ui, repo, not base and outgoing.excluded)
1246 return 1 1246 return 1
1247 1247
1248 bcompression = bundlespec.compression
1249 if cgversion == '01': #bundle1 1248 if cgversion == '01': #bundle1
1250 if bcompression is None: 1249 bversion = 'HG10' + bundlespec.wirecompression
1251 bcompression = 'UN'
1252 bversion = 'HG10' + bcompression
1253 bcompression = None 1250 bcompression = None
1254 elif cgversion in ('02', '03'): 1251 elif cgversion in ('02', '03'):
1255 bversion = 'HG20' 1252 bversion = 'HG20'
1253 bcompression = bundlespec.wirecompression
1256 else: 1254 else:
1257 raise error.ProgrammingError( 1255 raise error.ProgrammingError(
1258 'bundle: unexpected changegroup version %s' % cgversion) 1256 'bundle: unexpected changegroup version %s' % cgversion)
1259 1257
1260 # TODO compression options should be derived from bundlespec parsing. 1258 # TODO compression options should be derived from bundlespec parsing.