mercurial/exchange.py
changeset 33030 3e102a8dd52c
parent 33017 c31d45623304
child 33036 52c7060b707a
equal deleted inserted replaced
33029:b482d80e041b 33030:3e102a8dd52c
  1447         raise error.Abort(_("partial pull cannot be done because "
  1447         raise error.Abort(_("partial pull cannot be done because "
  1448                            "other repository doesn't support "
  1448                            "other repository doesn't support "
  1449                            "changegroupsubset."))
  1449                            "changegroupsubset."))
  1450     else:
  1450     else:
  1451         cg = pullop.remote.changegroupsubset(pullop.fetch, pullop.heads, 'pull')
  1451         cg = pullop.remote.changegroupsubset(pullop.fetch, pullop.heads, 'pull')
  1452     pullop.cgresult = cg.apply(pullop.repo, tr, 'pull', pullop.remote.url())
  1452     pullop.cgresult, addednodes = cg.apply(pullop.repo, tr, 'pull',
       
  1453                                            pullop.remote.url())
  1453 
  1454 
  1454 def _pullphase(pullop):
  1455 def _pullphase(pullop):
  1455     # Get remote phases data from remote
  1456     # Get remote phases data from remote
  1456     if 'phases' in pullop.stepsdone:
  1457     if 'phases' in pullop.stepsdone:
  1457         return
  1458         return
  1735         # push can proceed
  1736         # push can proceed
  1736         if not isinstance(cg, bundle2.unbundle20):
  1737         if not isinstance(cg, bundle2.unbundle20):
  1737             # legacy case: bundle1 (changegroup 01)
  1738             # legacy case: bundle1 (changegroup 01)
  1738             txnname = "\n".join([source, util.hidepassword(url)])
  1739             txnname = "\n".join([source, util.hidepassword(url)])
  1739             with repo.lock(), repo.transaction(txnname) as tr:
  1740             with repo.lock(), repo.transaction(txnname) as tr:
  1740                 r = cg.apply(repo, tr, source, url)
  1741                 r, addednodes = cg.apply(repo, tr, source, url)
  1741         else:
  1742         else:
  1742             r = None
  1743             r = None
  1743             try:
  1744             try:
  1744                 def gettransaction():
  1745                 def gettransaction():
  1745                     if not lockandtr[2]:
  1746                     if not lockandtr[2]: