D3809: synthrepo: use progress helper

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Jul 2 01:52:07 EDT 2018


martinvonz added inline comments.

INLINE COMMENTS

> pulkit wrote in synthrepo.py:178
> (sorry I missed this. I have my phabricator emails turned off)
> 
> > I meant to have a discussion about which behavior we want. For example, when the progress
> >  bar says 1/3, do you interpret that as processing the first item or that 1 item is already
> >  complete?
> 
> I think both :(. In network related bars where number of kbs or mbs are involved I think, 1/3 means 1 is already done. Sometimes in other processing, I think okay this one is processing.
> 
> However, I think if have verbs before the progress bars saying `processing`, `sending`, `recieving`, in those cases `processing 1/3` will mean processing the 1st item.
> 
> I still don't feel strong either way but I will like to have the same meaning throughout core.

Another point is that when we pass an `item` argument (often a filename), then it's helpful to show it before starting processing of the filename, so one can tell which one is slow. Also, if we updated the progress after processing, the last item would only be printed for a spit second (no matter how long time it took to process it). For those reasons, I now lean towards updating progress before processing. For consistency, I think it makes more sense to update progress before processing also when there's no `item` argument. I agree about doing it after processing when it's about processed bytes, though.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list