D3809: synthrepo: use progress helper
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Jun 19 12:14:13 EDT 2018
martinvonz added inline comments.
INLINE COMMENTS
> pulkit wrote in synthrepo.py:178
> progress.increment()?
That would mean that it would now start at 1 instead of 0. I made that change in one or two other patches and then I felt unsure if that's what we want, so I left the current behavior in this and later patches.
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?
A related issue is that it seems like either 0% or 100% wouldn't happen (for more than a split second, regardless of how slow each item is). Let's say we have 3 items. We can then do either of these:
progress.update(0)
for i [1,2,3]:
progress.update(i)
process(i)
progress.complete()
progress.update(0)
for i [1,2,3]:
process(i)
progress.update(i)
progress.complete()
As you can see, either the 0/3 or the 3/3 step will never really be displayed.
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