Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 10431:ba5e508b5e92
update: make calls to ui.progress()
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sun, 07 Feb 2010 17:44:30 -0600 |
parents | 08a0f04b56bd |
children | 0e64d814d7d0 |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Feb 07 12:00:40 2010 -0600 +++ b/mercurial/merge.py Sun Feb 07 17:44:30 2010 -0600 @@ -255,6 +255,7 @@ substate = wctx.substate # prime # prescan for merges + u = repo.ui for a in action: f, m = a[:2] if m == 'm': # merge @@ -277,8 +278,10 @@ audit_path = util.path_auditor(repo.root) - for a in action: + numupdates = len(action) + for i, a in enumerate(action): f, m = a[:2] + u.progress('update', i + 1, item=f, total=numupdates, unit='files') if f and f[0] == "/": continue if m == "r": # remove @@ -338,6 +341,7 @@ elif m == "e": # exec flags = a[2] util.set_flags(repo.wjoin(f), 'l' in flags, 'x' in flags) + u.progress('update', None, total=numupdates, unit='files') return updated, merged, removed, unresolved