Back out "hg: wrap convert in a big transaction for better pack behavior"

Summary:
I broke some svn tests in that commit, but while fixing forward
realized that we're blocked from making this change because we rely on
rolling back the last commit in the case where the filemap creates an
empty commit.

We can revisit this when we have convert this all to rust!

Reviewed By: sfilipco

Differential Revision: D17140172

fbshipit-source-id: c93911f599afd2d22e84b3327a2a9455204065a0
This commit is contained in:
Wez Furlong 2019-08-30 14:51:16 -07:00 committed by Facebook Github Bot
parent 846de7e82f
commit 3a13d58d7a

View File

@ -502,22 +502,19 @@ class converter(object):
c = None
self.ui.status(_("converting...\n"))
with self.dest.repo.transaction("convert"):
with progress.bar(
self.ui, _("converting"), _("revisions"), len(t)
) as prog:
for i, c in enumerate(t):
num -= 1
desc = self.commitcache[c].desc
if "\n" in desc:
desc = desc.splitlines()[0]
# convert log message to local encoding without using
# tolocal() because the encoding.encoding convert()
# uses is 'utf-8'
self.ui.status("%d %s\n" % (num, recode(desc)))
self.ui.note(_("source: %s\n") % recode(c))
prog.value = i
self.copy(c)
with progress.bar(self.ui, _("converting"), _("revisions"), len(t)) as prog:
for i, c in enumerate(t):
num -= 1
desc = self.commitcache[c].desc
if "\n" in desc:
desc = desc.splitlines()[0]
# convert log message to local encoding without using
# tolocal() because the encoding.encoding convert()
# uses is 'utf-8'
self.ui.status("%d %s\n" % (num, recode(desc)))
self.ui.note(_("source: %s\n") % recode(c))
prog.value = i
self.copy(c)
if not self.ui.configbool("convert", "skiptags"):
tags = self.source.gettags()