diff -r ef692614e601 -r 800f5a2c869e mercurial/scmutil.py --- a/mercurial/scmutil.py Sun Jun 17 22:13:41 2018 -0700 +++ b/mercurial/scmutil.py Sun Jun 17 13:48:58 2018 -0700 @@ -1293,6 +1293,12 @@ self.unit = unit self.total = total + def __enter__(self): + pass + + def __exit__(self, exc_type, exc_value, exc_tb): + self.complete() + def update(self, pos, item="", total=None): if total: self.total = total