Show More
@@ -403,6 +403,8 b' class pulloperation(object):' | |||||
403 | self.fetch = None |
|
403 | self.fetch = None | |
404 | # result of changegroup pulling (used as returng code by pull) |
|
404 | # result of changegroup pulling (used as returng code by pull) | |
405 | self.cgresult = None |
|
405 | self.cgresult = None | |
|
406 | # list of step remaining todo (related to future bundle2 usage) | |||
|
407 | self.todosteps = set(['changegroup', 'phases', 'obsmarkers']) | |||
406 |
|
408 | |||
407 | @util.propertycache |
|
409 | @util.propertycache | |
408 | def pulledsubset(self): |
|
410 | def pulledsubset(self): | |
@@ -451,8 +453,11 b' def pull(repo, remote, heads=None, force' | |||||
451 | lock = pullop.repo.lock() |
|
453 | lock = pullop.repo.lock() | |
452 | try: |
|
454 | try: | |
453 | _pulldiscovery(pullop) |
|
455 | _pulldiscovery(pullop) | |
|
456 | if 'changegroup' in pullop.todosteps: | |||
454 | _pullchangeset(pullop) |
|
457 | _pullchangeset(pullop) | |
|
458 | if 'phases' in pullop.todosteps: | |||
455 | _pullphase(pullop) |
|
459 | _pullphase(pullop) | |
|
460 | if 'obsmarkers' in pullop.todosteps: | |||
456 | _pullobsolete(pullop) |
|
461 | _pullobsolete(pullop) | |
457 | pullop.closetransaction() |
|
462 | pullop.closetransaction() | |
458 | finally: |
|
463 | finally: | |
@@ -477,6 +482,7 b' def _pullchangeset(pullop):' | |||||
477 | # We delay the open of the transaction as late as possible so we |
|
482 | # We delay the open of the transaction as late as possible so we | |
478 | # don't open transaction for nothing or you break future useful |
|
483 | # don't open transaction for nothing or you break future useful | |
479 | # rollback call |
|
484 | # rollback call | |
|
485 | pullop.todosteps.remove('changegroup') | |||
480 | if not pullop.fetch: |
|
486 | if not pullop.fetch: | |
481 | pullop.repo.ui.status(_("no changes found\n")) |
|
487 | pullop.repo.ui.status(_("no changes found\n")) | |
482 | pullop.cgresult = 0 |
|
488 | pullop.cgresult = 0 | |
@@ -505,6 +511,7 b' def _pullchangeset(pullop):' | |||||
505 |
|
511 | |||
506 | def _pullphase(pullop): |
|
512 | def _pullphase(pullop): | |
507 | # Get remote phases data from remote |
|
513 | # Get remote phases data from remote | |
|
514 | pullop.todosteps.remove('phases') | |||
508 | remotephases = pullop.remote.listkeys('phases') |
|
515 | remotephases = pullop.remote.listkeys('phases') | |
509 | publishing = bool(remotephases.get('publishing', False)) |
|
516 | publishing = bool(remotephases.get('publishing', False)) | |
510 | if remotephases and not publishing: |
|
517 | if remotephases and not publishing: | |
@@ -529,6 +536,7 b' def _pullobsolete(pullop):' | |||||
529 | a new transaction have been created (when applicable). |
|
536 | a new transaction have been created (when applicable). | |
530 |
|
537 | |||
531 | Exists mostly to allow overriding for experimentation purpose""" |
|
538 | Exists mostly to allow overriding for experimentation purpose""" | |
|
539 | pullop.todosteps.remove('obsmarkers') | |||
532 | tr = None |
|
540 | tr = None | |
533 | if obsolete._enabled: |
|
541 | if obsolete._enabled: | |
534 | pullop.repo.ui.debug('fetching remote obsolete markers\n') |
|
542 | pullop.repo.ui.debug('fetching remote obsolete markers\n') |
General Comments 0
You need to be logged in to leave comments.
Login now