Patchwork D3773: streamclone: update progress later to avoid passing None to util.bytecount

login
register
mail settings
Submitter phabricator
Date June 18, 2018, 3:14 a.m.
Message ID <differential-rev-PHID-DREV-godw3qsq32ghtasrfkck-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32232/
State Superseded
Headers show

Comments

phabricator - June 18, 2018, 3:14 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3773

AFFECTED FILES
  mercurial/streamclone.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - June 18, 2018, 4:55 a.m.
martinvonz accepted this revision.
martinvonz added a comment.
This revision is now accepted and ready to land.


  Thanks!

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3773

To: durin42, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel

Patch

diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py
--- a/mercurial/streamclone.py
+++ b/mercurial/streamclone.py
@@ -621,10 +621,10 @@ 
         elapsed = util.timer() - start
         if elapsed <= 0:
             elapsed = 0.001
-        progress.update(None)
         repo.ui.status(_('transferred %s in %.1f seconds (%s/sec)\n') %
                        (util.bytecount(progress.pos), elapsed,
                         util.bytecount(progress.pos / elapsed)))
+        progress.update(None)
 
 def applybundlev2(repo, fp, filecount, filesize, requirements):
     missingreqs = [r for r in requirements if r not in repo.supported]