mercurial/wireproto.py
changeset 35782 9d249f3de730
parent 35760 133a678673cb
child 35783 c97639ad6874
equal deleted inserted replaced
35781:c6ef8e841873 35782:9d249f3de730
   860             if proto.name == 'http':
   860             if proto.name == 'http':
   861                 return ooberror(bundle2required)
   861                 return ooberror(bundle2required)
   862             raise error.Abort(bundle2requiredmain,
   862             raise error.Abort(bundle2requiredmain,
   863                               hint=bundle2requiredhint)
   863                               hint=bundle2requiredhint)
   864 
   864 
       
   865     preferuncompressed = False
       
   866 
   865     try:
   867     try:
   866         if repo.ui.configbool('server', 'disablefullbundle'):
   868         if repo.ui.configbool('server', 'disablefullbundle'):
   867             # Check to see if this is a full clone.
   869             # Check to see if this is a full clone.
   868             clheads = set(repo.changelog.heads())
   870             clheads = set(repo.changelog.heads())
   869             changegroup = opts.get('cg', True)
   871             changegroup = opts.get('cg', True)
   889         advargs = []
   891         advargs = []
   890         if exc.hint is not None:
   892         if exc.hint is not None:
   891             advargs.append(('hint', exc.hint))
   893             advargs.append(('hint', exc.hint))
   892         bundler.addpart(bundle2.bundlepart('error:abort',
   894         bundler.addpart(bundle2.bundlepart('error:abort',
   893                                            manargs, advargs))
   895                                            manargs, advargs))
   894         return streamres(gen=bundler.getchunks())
   896         chunks = bundler.getchunks()
   895     return streamres(gen=chunks)
   897         preferuncompressed = True
       
   898 
       
   899     return streamres(gen=chunks, prefer_uncompressed=preferuncompressed)
   896 
   900 
   897 @wireprotocommand('heads')
   901 @wireprotocommand('heads')
   898 def heads(repo, proto):
   902 def heads(repo, proto):
   899     h = repo.heads()
   903     h = repo.heads()
   900     return encodelist(h) + "\n"
   904     return encodelist(h) + "\n"