# HG changeset patch # User Kevin Bullock # Date 1508873592 18000 # Node ID f4c2b42731ea2b957e99a11c17761b8d1ad35caa # Parent ddae0045de4e704552925109c824392dbedd9c76 config: register hggit.mapsavefrequency diff --git a/hggit/compat.py b/hggit/compat.py --- a/hggit/compat.py +++ b/hggit/compat.py @@ -69,6 +69,9 @@ 'branch_bookmark_suffix': None, 'intree': None, }, + 'hggit': { + 'mapsavefrequency': 0, + } } hasconfigitems = False diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -490,7 +490,8 @@ exporter = hg2git.IncrementalChangesetExporter( self.repo, pctx, self.git.object_store, gitcommit) - mapsavefreq = self.ui.configint('hggit', 'mapsavefrequency', 0) + mapsavefreq = compat.config(self.ui, 'int', 'hggit', + 'mapsavefrequency') for i, ctx in enumerate(export): self.ui.progress('exporting', i, total=total) self.export_hg_commit(ctx.node(), exporter) @@ -777,7 +778,8 @@ else: self.ui.status(_("no changes found\n")) - mapsavefreq = self.ui.configint('hggit', 'mapsavefrequency', 0) + mapsavefreq = compat.config(self.ui, 'int', 'hggit', + 'mapsavefrequency') for i, csha in enumerate(commits): self.ui.progress('importing', i, total=total, unit='commits') commit = commit_cache[csha]