Show More
@@ -1492,9 +1492,12 b' def handlechangegroup(op, inpart):' | |||
|
1492 | 1492 | op.repo.requirements.add('treemanifest') |
|
1493 | 1493 | op.repo._applyopenerreqs() |
|
1494 | 1494 | op.repo._writerequirements() |
|
1495 | ret = cg.apply(op.repo, tr, 'bundle2', 'bundle2', | |
|
1496 | expectedtotal=nbchangesets) | |
|
1497 |
op.records.add('changegroup', { |
|
|
1495 | ret, addednodes = cg.apply(op.repo, tr, 'bundle2', 'bundle2', | |
|
1496 | expectedtotal=nbchangesets) | |
|
1497 | op.records.add('changegroup', { | |
|
1498 | 'return': ret, | |
|
1499 | 'addednodes': addednodes, | |
|
1500 | }) | |
|
1498 | 1501 | if op.reply is not None: |
|
1499 | 1502 | # This is definitely not the final form of this |
|
1500 | 1503 | # return. But one need to start somewhere. |
@@ -1557,8 +1560,11 b' def handleremotechangegroup(op, inpart):' | |||
|
1557 | 1560 | if not isinstance(cg, changegroup.cg1unpacker): |
|
1558 | 1561 | raise error.Abort(_('%s: not a bundle version 1.0') % |
|
1559 | 1562 | util.hidepassword(raw_url)) |
|
1560 | ret = cg.apply(op.repo, tr, 'bundle2', 'bundle2') | |
|
1561 |
op.records.add('changegroup', { |
|
|
1563 | ret, addednodes = cg.apply(op.repo, tr, 'bundle2', 'bundle2') | |
|
1564 | op.records.add('changegroup', { | |
|
1565 | 'return': ret, | |
|
1566 | 'addednodes': addednodes, | |
|
1567 | }) | |
|
1562 | 1568 | if op.reply is not None: |
|
1563 | 1569 | # This is definitely not the final form of this |
|
1564 | 1570 | # return. But one need to start somewhere. |
@@ -426,9 +426,10 b' class cg1unpacker(object):' | |||
|
426 | 426 | repo.ui.flush() |
|
427 | 427 | # never return 0 here: |
|
428 | 428 | if deltaheads < 0: |
|
429 |
ret |
|
|
429 | ret = deltaheads - 1 | |
|
430 | 430 | else: |
|
431 |
ret |
|
|
431 | ret = deltaheads + 1 | |
|
432 | return ret, added | |
|
432 | 433 | |
|
433 | 434 | class cg2unpacker(cg1unpacker): |
|
434 | 435 | """Unpacker for cg2 streams. |
@@ -5218,7 +5218,7 b' def unbundle(ui, repo, fname1, *fnames, ' | |||
|
5218 | 5218 | else: |
|
5219 | 5219 | txnname = 'unbundle\n%s' % util.hidepassword(url) |
|
5220 | 5220 | with repo.transaction(txnname) as tr: |
|
5221 | modheads = gen.apply(repo, tr, 'unbundle', url) | |
|
5221 | modheads, addednodes = gen.apply(repo, tr, 'unbundle', url) | |
|
5222 | 5222 | |
|
5223 | 5223 | return postincoming(ui, repo, modheads, opts.get(r'update'), None, None) |
|
5224 | 5224 |
@@ -1449,7 +1449,8 b' def _pullchangeset(pullop):' | |||
|
1449 | 1449 | "changegroupsubset.")) |
|
1450 | 1450 | else: |
|
1451 | 1451 | cg = pullop.remote.changegroupsubset(pullop.fetch, pullop.heads, 'pull') |
|
1452 |
pullop.cgresult = cg.apply(pullop.repo, tr, 'pull', |
|
|
1452 | pullop.cgresult, addednodes = cg.apply(pullop.repo, tr, 'pull', | |
|
1453 | pullop.remote.url()) | |
|
1453 | 1454 | |
|
1454 | 1455 | def _pullphase(pullop): |
|
1455 | 1456 | # Get remote phases data from remote |
@@ -1737,7 +1738,7 b' def unbundle(repo, cg, heads, source, ur' | |||
|
1737 | 1738 | # legacy case: bundle1 (changegroup 01) |
|
1738 | 1739 | txnname = "\n".join([source, util.hidepassword(url)]) |
|
1739 | 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 | 1742 | else: |
|
1742 | 1743 | r = None |
|
1743 | 1744 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now