Show More
@@ -488,13 +488,13 b' class mercurial_source(converter_source)' | |||
|
488 | 488 | self.keep = nodes.__contains__ |
|
489 | 489 | self._heads = nodes - parents |
|
490 | 490 | |
|
491 | def changectx(self, rev): | |
|
491 | def _changectx(self, rev): | |
|
492 | 492 | if self.lastrev != rev: |
|
493 | 493 | self.lastctx = self.repo[rev] |
|
494 | 494 | self.lastrev = rev |
|
495 | 495 | return self.lastctx |
|
496 | 496 | |
|
497 | def parents(self, ctx): | |
|
497 | def _parents(self, ctx): | |
|
498 | 498 | return [p for p in ctx.parents() if p and self.keep(p.node())] |
|
499 | 499 | |
|
500 | 500 | def getheads(self): |
@@ -502,14 +502,14 b' class mercurial_source(converter_source)' | |||
|
502 | 502 | |
|
503 | 503 | def getfile(self, name, rev): |
|
504 | 504 | try: |
|
505 | fctx = self.changectx(rev)[name] | |
|
505 | fctx = self._changectx(rev)[name] | |
|
506 | 506 | return fctx.data(), fctx.flags() |
|
507 | 507 | except error.LookupError: |
|
508 | 508 | return None, None |
|
509 | 509 | |
|
510 | 510 | def getchanges(self, rev, full): |
|
511 | ctx = self.changectx(rev) | |
|
512 | parents = self.parents(ctx) | |
|
511 | ctx = self._changectx(rev) | |
|
512 | parents = self._parents(ctx) | |
|
513 | 513 | if full or not parents: |
|
514 | 514 | files = copyfiles = ctx.manifest() |
|
515 | 515 | if parents: |
@@ -520,9 +520,9 b' class mercurial_source(converter_source)' | |||
|
520 | 520 | if not full: |
|
521 | 521 | files = m + a + r |
|
522 | 522 | copyfiles = m + a |
|
523 | # getcopies() is also run for roots and before filtering so missing | |
|
523 | # _getcopies() is also run for roots and before filtering so missing | |
|
524 | 524 | # revlogs are detected early |
|
525 | copies = self.getcopies(ctx, parents, copyfiles) | |
|
525 | copies = self._getcopies(ctx, parents, copyfiles) | |
|
526 | 526 | cleanp2 = set() |
|
527 | 527 | if len(parents) == 2: |
|
528 | 528 | cleanp2.update(self.repo.status(parents[1].node(), ctx.node(), |
@@ -531,7 +531,7 b' class mercurial_source(converter_source)' | |||
|
531 | 531 | changes.sort() |
|
532 | 532 | return changes, copies, cleanp2 |
|
533 | 533 | |
|
534 | def getcopies(self, ctx, parents, files): | |
|
534 | def _getcopies(self, ctx, parents, files): | |
|
535 | 535 | copies = {} |
|
536 | 536 | for name in files: |
|
537 | 537 | if name in self.ignored: |
@@ -559,8 +559,8 b' class mercurial_source(converter_source)' | |||
|
559 | 559 | return copies |
|
560 | 560 | |
|
561 | 561 | def getcommit(self, rev): |
|
562 | ctx = self.changectx(rev) | |
|
563 | parents = [p.hex() for p in self.parents(ctx)] | |
|
562 | ctx = self._changectx(rev) | |
|
563 | parents = [p.hex() for p in self._parents(ctx)] | |
|
564 | 564 | crev = rev |
|
565 | 565 | |
|
566 | 566 | return commit(author=ctx.user(), |
@@ -578,8 +578,8 b' class mercurial_source(converter_source)' | |||
|
578 | 578 | if self.keep(node)]) |
|
579 | 579 | |
|
580 | 580 | def getchangedfiles(self, rev, i): |
|
581 | ctx = self.changectx(rev) | |
|
582 | parents = self.parents(ctx) | |
|
581 | ctx = self._changectx(rev) | |
|
582 | parents = self._parents(ctx) | |
|
583 | 583 | if not parents and i is None: |
|
584 | 584 | i = 0 |
|
585 | 585 | changes = [], ctx.manifest().keys(), [] |
General Comments 0
You need to be logged in to leave comments.
Login now