Mercurial > hg-git
comparison hggit/git_handler.py @ 1067:f4c2b42731ea
config: register hggit.mapsavefrequency
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Tue, 24 Oct 2017 14:33:12 -0500 |
parents | ddae0045de4e |
children | 914e5477b17e |
comparison
equal
deleted
inserted
replaced
1066:ddae0045de4e | 1067:f4c2b42731ea |
---|---|
488 'repo: %s' % gitsha)) | 488 'repo: %s' % gitsha)) |
489 | 489 |
490 exporter = hg2git.IncrementalChangesetExporter( | 490 exporter = hg2git.IncrementalChangesetExporter( |
491 self.repo, pctx, self.git.object_store, gitcommit) | 491 self.repo, pctx, self.git.object_store, gitcommit) |
492 | 492 |
493 mapsavefreq = self.ui.configint('hggit', 'mapsavefrequency', 0) | 493 mapsavefreq = compat.config(self.ui, 'int', 'hggit', |
494 'mapsavefrequency') | |
494 for i, ctx in enumerate(export): | 495 for i, ctx in enumerate(export): |
495 self.ui.progress('exporting', i, total=total) | 496 self.ui.progress('exporting', i, total=total) |
496 self.export_hg_commit(ctx.node(), exporter) | 497 self.export_hg_commit(ctx.node(), exporter) |
497 if mapsavefreq and i % mapsavefreq == 0: | 498 if mapsavefreq and i % mapsavefreq == 0: |
498 self.ui.debug(_("saving mapfile\n")) | 499 self.ui.debug(_("saving mapfile\n")) |
775 if total: | 776 if total: |
776 self.ui.status(_("importing git objects into hg\n")) | 777 self.ui.status(_("importing git objects into hg\n")) |
777 else: | 778 else: |
778 self.ui.status(_("no changes found\n")) | 779 self.ui.status(_("no changes found\n")) |
779 | 780 |
780 mapsavefreq = self.ui.configint('hggit', 'mapsavefrequency', 0) | 781 mapsavefreq = compat.config(self.ui, 'int', 'hggit', |
782 'mapsavefrequency') | |
781 for i, csha in enumerate(commits): | 783 for i, csha in enumerate(commits): |
782 self.ui.progress('importing', i, total=total, unit='commits') | 784 self.ui.progress('importing', i, total=total, unit='commits') |
783 commit = commit_cache[csha] | 785 commit = commit_cache[csha] |
784 self.import_git_commit(commit) | 786 self.import_git_commit(commit) |
785 if mapsavefreq and i % mapsavefreq == 0: | 787 if mapsavefreq and i % mapsavefreq == 0: |