[PATCH 2 of 3] Use progress indicator for hg update

Thomas Arendsen Hein thomas at intevation.de
Mon Jul 23 02:49:29 CDT 2007


# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Date 1185174777 -7200
# Node ID 6c4ee431568afee001ec7d5296972f12d9d09463
# Parent  01248968b792bd4955d4c133b771746b08f65f40
Use progress indicator for hg update

diff -r 01248968b792 -r 6c4ee431568a mercurial/merge.py
--- a/mercurial/merge.py	Mon Jul 23 09:26:59 2007 +0200
+++ b/mercurial/merge.py	Mon Jul 23 09:12:57 2007 +0200
@@ -380,6 +380,7 @@ def applyupdates(repo, action, wctx, mct
 
     updated, merged, removed, unresolved = 0, 0, 0, 0
     action.sort()
+    progress = repo.ui.progress(_("updating"), len(action))
     for a in action:
         f, m = a[:2]
         if f and f[0] == "/":
@@ -437,6 +438,8 @@ def applyupdates(repo, action, wctx, mct
         elif m == "e": # exec
             flags = a[2]
             util.set_exec(repo.wjoin(f), flags)
+        progress.update()
+    progress.finish()
 
     return updated, merged, removed, unresolved
 



More information about the Mercurial-devel mailing list