[PATCH 1 of 2] largefiles: show progress when checking standin hashes in outgoing changesets
Mads Kiilerich
mads at kiilerich.com
Fri Jan 16 18:51:44 UTC 2015
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1421434285 -3600
# Fri Jan 16 19:51:25 2015 +0100
# Node ID dead34ad89f94629703d2595e2df6e0e351c5cc4
# Parent 049a9e3a078d7c988cb12ed456aad6ec2779ea69
largefiles: show progress when checking standin hashes in outgoing changesets
This checking can take a huge amount of time and we should give user a hint
that something is going on.
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -420,7 +420,9 @@ def getlfilestoupdate(oldstandins, newst
return filelist
def getlfilestoupload(repo, missing, addfunc):
- for n in missing:
+ for i, n in enumerate(missing):
+ repo.ui.progress(_('finding outgoing largefiles'), i,
+ unit=_('revision'), total=len(missing))
parents = [p for p in repo.changelog.parents(n) if p != node.nullid]
oldlfstatus = repo.lfstatus
@@ -447,6 +449,7 @@ def getlfilestoupload(repo, missing, add
for fn in files:
if isstandin(fn) and fn in ctx:
addfunc(fn, ctx[fn].data().strip())
+ repo.ui.progress(_('finding outgoing largefiles'), None)
def updatestandinsbymatch(repo, match):
'''Update standins in the working directory according to specified match
diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
--- a/tests/test-largefiles-misc.t
+++ b/tests/test-largefiles-misc.t
@@ -590,6 +590,8 @@ check messages when there are files to u
all remote heads known locally
1:1acbe71ce432
2:6095d0695d70
+ finding outgoing largefiles: 0/2 revision (0.00%)
+ finding outgoing largefiles: 1/2 revision (50.00%)
largefiles to upload (1 entities):
b
89e6c98d92887913cadf06b2adb97f26cde4849b
@@ -645,6 +647,11 @@ check messages when there are files to u
3:7983dce246cc
4:233f12ada4ae
5:036794ea641c
+ finding outgoing largefiles: 0/5 revision (0.00%)
+ finding outgoing largefiles: 1/5 revision (20.00%)
+ finding outgoing largefiles: 2/5 revision (40.00%)
+ finding outgoing largefiles: 3/5 revision (60.00%)
+ finding outgoing largefiles: 4/5 revision (80.00%)
largefiles to upload (3 entities):
b
13f9ed0898e315bf59dc2973fec52037b6f441a2
@@ -690,6 +697,10 @@ and #5 refer it.
3:7983dce246cc
4:233f12ada4ae
5:036794ea641c
+ finding outgoing largefiles: 0/4 revision (0.00%)
+ finding outgoing largefiles: 1/4 revision (25.00%)
+ finding outgoing largefiles: 2/4 revision (50.00%)
+ finding outgoing largefiles: 3/4 revision (75.00%)
largefiles to upload (2 entities):
b
13f9ed0898e315bf59dc2973fec52037b6f441a2
More information about the Mercurial-devel
mailing list