D3861: scmutil: fix __enter__ in progress context manager

hooper (Danny Hooper) phabricator at mercurial-scm.org
Sun Jul 1 22:43:53 UTC 2018


hooper updated this revision to Diff 9402.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3861?vs=9380&id=9402

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1328,7 +1328,7 @@
         self.total = total
 
     def __enter__(self):
-        pass
+        return self
 
     def __exit__(self, exc_type, exc_value, exc_tb):
         self.complete()



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


More information about the Mercurial-devel mailing list