equal
deleted
inserted
replaced
487 verify_node=True, |
487 verify_node=True, |
488 ) |
488 ) |
489 if not bcache.validfor(repo): |
489 if not bcache.validfor(repo): |
490 # invalidate the cache |
490 # invalidate the cache |
491 raise ValueError('tip differs') |
491 raise ValueError('tip differs') |
492 bcache.load(repo, lineiter) |
492 bcache._load_heads(repo, lineiter) |
493 except (IOError, OSError): |
493 except (IOError, OSError): |
494 return None |
494 return None |
495 |
495 |
496 except Exception as inst: |
496 except Exception as inst: |
497 if repo.ui.debugflag: |
497 if repo.ui.debugflag: |
509 if f: |
509 if f: |
510 f.close() |
510 f.close() |
511 |
511 |
512 return bcache |
512 return bcache |
513 |
513 |
514 def load(self, repo, lineiter): |
514 def _load_heads(self, repo, lineiter): |
515 """fully loads the branchcache by reading from the file using the line |
515 """fully loads the branchcache by reading from the file using the line |
516 iterator passed""" |
516 iterator passed""" |
517 for line in lineiter: |
517 for line in lineiter: |
518 line = line.rstrip(b'\n') |
518 line = line.rstrip(b'\n') |
519 if not line: |
519 if not line: |