Show More
@@ -172,13 +172,10 b' def analyze(ui, repo, *revs, **opts):' | |||
|
172 | 172 | revs = scmutil.revrange(repo, revs) |
|
173 | 173 | revs.sort() |
|
174 | 174 | |
|
175 | progress = ui.progress | |
|
176 | _analyzing = _('analyzing') | |
|
177 | _changesets = _('changesets') | |
|
178 | _total = len(revs) | |
|
179 | ||
|
175 | progress = ui.makeprogress(_('analyzing'), unit=_('changesets'), | |
|
176 | total=len(revs)) | |
|
180 | 177 | for i, rev in enumerate(revs): |
|
181 | progress(_analyzing, i, unit=_changesets, total=_total) | |
|
178 | progress.update(i) | |
|
182 | 179 | ctx = repo[rev] |
|
183 | 180 | pl = ctx.parents() |
|
184 | 181 | pctx = pl[0] |
@@ -338,7 +335,6 b' def synthesize(ui, repo, descpath, **opt' | |||
|
338 | 335 | |
|
339 | 336 | nevertouch = {'.hgsub', '.hgignore', '.hgtags'} |
|
340 | 337 | |
|
341 | progress = ui.progress | |
|
342 | 338 | _synthesizing = _('synthesizing') |
|
343 | 339 | _files = _('initial files') |
|
344 | 340 | _changesets = _('changesets') |
@@ -362,8 +358,9 b' def synthesize(ui, repo, descpath, **opt' | |||
|
362 | 358 | path = os.path.dirname(path) |
|
363 | 359 | return True |
|
364 | 360 | |
|
361 | progress = ui.makeprogress(_synthesizing, unit=_files, total=initcount) | |
|
365 | 362 | for i in xrange(0, initcount): |
|
366 | ui.progress(_synthesizing, i, unit=_files, total=initcount) | |
|
363 | progress.update(i) | |
|
367 | 364 | |
|
368 | 365 | path = pickpath() |
|
369 | 366 | while not validpath(path): |
@@ -378,7 +375,7 b' def synthesize(ui, repo, descpath, **opt' | |||
|
378 | 375 | def filectxfn(repo, memctx, path): |
|
379 | 376 | return context.memfilectx(repo, memctx, path, files[path]) |
|
380 | 377 | |
|
381 | ui.progress(_synthesizing, None) | |
|
378 | progress.complete() | |
|
382 | 379 | message = 'synthesized wide repo with %d files' % (len(files),) |
|
383 | 380 | mc = context.memctx(repo, [pctx.node(), nullid], message, |
|
384 | 381 | files, filectxfn, ui.username(), |
@@ -394,8 +391,9 b' def synthesize(ui, repo, descpath, **opt' | |||
|
394 | 391 | # Synthesize incremental revisions to the repository, adding repo depth. |
|
395 | 392 | count = int(opts['count']) |
|
396 | 393 | heads = set(map(repo.changelog.rev, repo.heads())) |
|
394 | progress = ui.makeprogress(_synthesizing, unit=_changesets, total=count) | |
|
397 | 395 | for i in xrange(count): |
|
398 | progress(_synthesizing, i, unit=_changesets, total=count) | |
|
396 | progress.update(i) | |
|
399 | 397 | |
|
400 | 398 | node = repo.changelog.node |
|
401 | 399 | revs = len(repo) |
General Comments 0
You need to be logged in to leave comments.
Login now