Patchwork D7991: progress: delete deprecated ui.progress()

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2020, 11:26 p.m.
Message ID <9bd4772a56ecd45bbab30d314cb2b5d3@localhost.localdomain>
Download mbox | patch
Permalink /patch/44627/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2020, 11:26 p.m.
Closed by commit rHGdf2162672d24: progress: delete deprecated ui.progress() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7991?vs=19569&id=19570

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7991/new/

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

AFFECTED FILES
  mercurial/ui.py
  relnotes/next

CHANGE DETAILS




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

Patch

diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -12,3 +12,5 @@ 
 
 == Internal API Changes ==
 
+ * The deprecated `ui.progress()` has now been deleted. Please use
+   `ui.makeprogress()` instead.
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1939,30 +1939,6 @@ 
         if self._progbar is not None and self._progbar.printed:
             self._progbar.clear()
 
-    def progress(self, topic, pos, item=b"", unit=b"", total=None):
-        '''show a progress message
-
-        By default a textual progress bar will be displayed if an operation
-        takes too long. 'topic' is the current operation, 'item' is a
-        non-numeric marker of the current position (i.e. the currently
-        in-process file), 'pos' is the current numeric position (i.e.
-        revision, bytes, etc.), unit is a corresponding unit label,
-        and total is the highest expected pos.
-
-        Multiple nested topics may be active at a time.
-
-        All topics should be marked closed by setting pos to None at
-        termination.
-        '''
-        self.deprecwarn(
-            b"use ui.makeprogress() instead of ui.progress()", b"5.1"
-        )
-        progress = self.makeprogress(topic, unit, total)
-        if pos is not None:
-            progress.update(pos, item=item)
-        else:
-            progress.complete()
-
     def makeprogress(self, topic, unit=b"", total=None):
         """Create a progress helper for the specified topic"""
         if getattr(self._fmsgerr, 'structured', False):