mercurial/localrepo.py
changeset 26445 f134fb33c906
parent 26442 ef8d27f53204
child 26448 e05fd574c922
equal deleted inserted replaced
26444:623743010133 26445:f134fb33c906
  1792         '''clone remote repository.
  1792         '''clone remote repository.
  1793 
  1793 
  1794         keyword arguments:
  1794         keyword arguments:
  1795         heads: list of revs to clone (forces use of pull)
  1795         heads: list of revs to clone (forces use of pull)
  1796         stream: use streaming clone if possible'''
  1796         stream: use streaming clone if possible'''
  1797 
  1797         streamclone.maybeperformstreamclone(self, remote, heads, stream)
  1798         # now, all clients that can request uncompressed clones can
       
  1799         # read repo formats supported by all servers that can serve
       
  1800         # them.
       
  1801 
       
  1802         # if revlog format changes, client will have to check version
       
  1803         # and format flags on "stream" capability, and use
       
  1804         # uncompressed only if compatible.
       
  1805 
       
  1806         if stream is None:
       
  1807             # if the server explicitly prefers to stream (for fast LANs)
       
  1808             stream = remote.capable('stream-preferred')
       
  1809 
       
  1810         if stream and not heads:
       
  1811             # 'stream' means remote revlog format is revlogv1 only
       
  1812             if remote.capable('stream'):
       
  1813                 streamclone.streamin(self, remote, set(('revlogv1',)))
       
  1814             else:
       
  1815                 # otherwise, 'streamreqs' contains the remote revlog format
       
  1816                 streamreqs = remote.capable('streamreqs')
       
  1817                 if streamreqs:
       
  1818                     streamreqs = set(streamreqs.split(','))
       
  1819                     # if we support it, stream in and adjust our requirements
       
  1820                     if not streamreqs - self.supportedformats:
       
  1821                         streamclone.streamin(self, remote, streamreqs)
       
  1822 
  1798 
  1823         # internal config: ui.quietbookmarkmove
  1799         # internal config: ui.quietbookmarkmove
  1824         quiet = self.ui.backupconfig('ui', 'quietbookmarkmove')
  1800         quiet = self.ui.backupconfig('ui', 'quietbookmarkmove')
  1825         try:
  1801         try:
  1826             self.ui.setconfig('ui', 'quietbookmarkmove', True, 'clone')
  1802             self.ui.setconfig('ui', 'quietbookmarkmove', True, 'clone')