Mercurial > hg-stable
view README.rst @ 38351:bec1212eceaa
progress: create helper class for incrementing progress
When using ui.progress(), there's a clear pattern that is followed:
* Pass the same topic and unit
* Usually pass the same total
* Call with pos=None to close the progress bar
* Often keep track of the current position and increment it
This patch creates a simple helper class for this. I'll probably make
it implement the context manager protocol later (calling update(None)
on __exit__).
Progress is used in low-level modules like changegroup, so I also
exposed it via a method on the ui object. Perhaps the class itself
should also live in ui.py?
This patch also makes merge.oy use it to show that it works.
Differential Revision: https://phab.mercurial-scm.org/D3765
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 15 Jun 2018 22:37:01 -0700 |
parents | 1b59287a1cfa |
children | c5912e35d06d |
line wrap: on
line source
Mercurial ========= Mercurial is a fast, easy to use, distributed revision control tool for software developers. Basic install:: $ make # see install targets $ make install # do a system-wide install $ hg debuginstall # sanity-check setup $ hg # see help Running without installing:: $ make local # build for inplace usage $ ./hg --version # should show the latest version See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.