comparison hggit/git_handler.py @ 1110:94aaea5c65f7

cleanup: fix incorrect indentation
author Sean Farley <sean@farley.io>
date Mon, 27 Nov 2017 18:22:34 -0500
parents 21264429a8d4
children c66e920d261f
comparison
equal deleted inserted replaced
1109:21264429a8d4 1110:94aaea5c65f7
474 repo = self.repo 474 repo = self.repo
475 clnode = repo.changelog.node 475 clnode = repo.changelog.node
476 476
477 nodes = (clnode(n) for n in repo) 477 nodes = (clnode(n) for n in repo)
478 to_export = (repo[node] for node in nodes if not hex(node) in 478 to_export = (repo[node] for node in nodes if not hex(node) in
479 self._map_hg) 479 self._map_hg)
480 480
481 todo_total = len(repo) - len(self._map_hg) 481 todo_total = len(repo) - len(self._map_hg)
482 topic = 'find commits to export' 482 topic = 'find commits to export'
483 pos = 0 483 pos = 0
484 unit = 'commits' 484 unit = 'commits'
517 517
518 exporter = hg2git.IncrementalChangesetExporter( 518 exporter = hg2git.IncrementalChangesetExporter(
519 self.repo, pctx, self.git.object_store, gitcommit) 519 self.repo, pctx, self.git.object_store, gitcommit)
520 520
521 mapsavefreq = compat.config(self.ui, 'int', 'hggit', 521 mapsavefreq = compat.config(self.ui, 'int', 'hggit',
522 'mapsavefrequency') 522 'mapsavefrequency')
523 for i, ctx in enumerate(export): 523 for i, ctx in enumerate(export):
524 self.ui.progress('exporting', i, total=total) 524 self.ui.progress('exporting', i, total=total)
525 self.export_hg_commit(ctx.node(), exporter) 525 self.export_hg_commit(ctx.node(), exporter)
526 if mapsavefreq and i % mapsavefreq == 0: 526 if mapsavefreq and i % mapsavefreq == 0:
527 self.ui.debug(_("saving mapfile\n")) 527 self.ui.debug(_("saving mapfile\n"))
809 self.ui.status(_("importing git objects into hg\n")) 809 self.ui.status(_("importing git objects into hg\n"))
810 else: 810 else:
811 self.ui.status(_("no changes found\n")) 811 self.ui.status(_("no changes found\n"))
812 812
813 mapsavefreq = compat.config(self.ui, 'int', 'hggit', 813 mapsavefreq = compat.config(self.ui, 'int', 'hggit',
814 'mapsavefrequency') 814 'mapsavefrequency')
815 for i, csha in enumerate(commits): 815 for i, csha in enumerate(commits):
816 self.ui.progress('importing', i, total=total, unit='commits') 816 self.ui.progress('importing', i, total=total, unit='commits')
817 commit = commit_cache[csha] 817 commit = commit_cache[csha]
818 self.import_git_commit(commit) 818 self.import_git_commit(commit)
819 if mapsavefreq and i % mapsavefreq == 0: 819 if mapsavefreq and i % mapsavefreq == 0: