mercurial/exchange.py
changeset 50174 596a6b9b0570
parent 49765 4188e75af983
child 50524 58adcabc295f
equal deleted inserted replaced
50173:bf27727e6c78 50174:596a6b9b0570
  1181             raise error.RemoteError(_(b'missing support for %s') % exc)
  1181             raise error.RemoteError(_(b'missing support for %s') % exc)
  1182         try:
  1182         try:
  1183             trgetter = None
  1183             trgetter = None
  1184             if pushback:
  1184             if pushback:
  1185                 trgetter = pushop.trmanager.transaction
  1185                 trgetter = pushop.trmanager.transaction
  1186             op = bundle2.processbundle(pushop.repo, reply, trgetter)
  1186             op = bundle2.processbundle(
       
  1187                 pushop.repo,
       
  1188                 reply,
       
  1189                 trgetter,
       
  1190                 remote=pushop.remote,
       
  1191             )
  1187         except error.BundleValueError as exc:
  1192         except error.BundleValueError as exc:
  1188             raise error.RemoteError(_(b'missing support for %s') % exc)
  1193             raise error.RemoteError(_(b'missing support for %s') % exc)
  1189         except bundle2.AbortFromPart as exc:
  1194         except bundle2.AbortFromPart as exc:
  1190             pushop.ui.error(_(b'remote: %s\n') % exc)
  1195             pushop.ui.error(_(b'remote: %s\n') % exc)
  1191             if exc.hint is not None:
  1196             if exc.hint is not None:
  1901         args[b'source'] = b'pull'
  1906         args[b'source'] = b'pull'
  1902         bundle = e.callcommand(b'getbundle', args).result()
  1907         bundle = e.callcommand(b'getbundle', args).result()
  1903 
  1908 
  1904         try:
  1909         try:
  1905             op = bundle2.bundleoperation(
  1910             op = bundle2.bundleoperation(
  1906                 pullop.repo, pullop.gettransaction, source=b'pull'
  1911                 pullop.repo,
       
  1912                 pullop.gettransaction,
       
  1913                 source=b'pull',
       
  1914                 remote=pullop.remote,
  1907             )
  1915             )
  1908             op.modes[b'bookmarks'] = b'records'
  1916             op.modes[b'bookmarks'] = b'records'
  1909             bundle2.processbundle(pullop.repo, bundle, op=op)
  1917             bundle2.processbundle(
       
  1918                 pullop.repo,
       
  1919                 bundle,
       
  1920                 op=op,
       
  1921                 remote=pullop.remote,
       
  1922             )
  1910         except bundle2.AbortFromPart as exc:
  1923         except bundle2.AbortFromPart as exc:
  1911             pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
  1924             pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
  1912             raise error.RemoteError(_(b'pull failed on remote'), hint=exc.hint)
  1925             raise error.RemoteError(_(b'pull failed on remote'), hint=exc.hint)
  1913         except error.BundleValueError as exc:
  1926         except error.BundleValueError as exc:
  1914             raise error.RemoteError(_(b'missing support for %s') % exc)
  1927             raise error.RemoteError(_(b'missing support for %s') % exc)
  1993                     b'source': b'pull',
  2006                     b'source': b'pull',
  1994                 },
  2007                 },
  1995             ).result()
  2008             ).result()
  1996 
  2009 
  1997     bundleop = bundle2.applybundle(
  2010     bundleop = bundle2.applybundle(
  1998         pullop.repo, cg, tr, b'pull', pullop.remote.url()
  2011         pullop.repo,
       
  2012         cg,
       
  2013         tr,
       
  2014         b'pull',
       
  2015         pullop.remote.url(),
       
  2016         remote=pullop.remote,
  1999     )
  2017     )
  2000     pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
  2018     pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
  2001 
  2019 
  2002 
  2020 
  2003 def _pullphase(pullop):
  2021 def _pullphase(pullop):