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