D3537: dispatch: minor code refactor

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat May 12 02:01:47 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe9c588802529: dispatch: minor code refactor (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3537?vs=8653&id=8656

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

AFFECTED FILES
  mercurial/dispatch.py

CHANGE DETAILS

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -87,16 +87,19 @@
     req = request(pycompat.sysargv[1:])
     err = None
     try:
-        status = (dispatch(req) or 0)
+        status = dispatch(req) or 0
     except error.StdioError as e:
         err = e
         status = -1
+
+    # In all cases we try to flush stdio streams.
     if util.safehasattr(req.ui, 'fout'):
         try:
             req.ui.fout.flush()
         except IOError as e:
             err = e
             status = -1
+
     if util.safehasattr(req.ui, 'ferr'):
         try:
             if err is not None and err.errno != errno.EPIPE:



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list