This is an archive of the discontinued Mercurial Phabricator instance.

dispatch: drop redundant setting of "ret" to -1
AbandonedPublic

Authored by martinvonz on May 15 2018, 1:33 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

It has already been set to -1 since 6f9ac3cb0987 (dispatch: unify
handling of None returned by a command function, 2018-05-12).

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.May 15 2018, 1:33 PM
yuja added a subscriber: yuja.May 16 2018, 7:42 AM

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py

  • a/mercurial/dispatch.py

+++ b/mercurial/dispatch.py
@@ -230,7 +230,6 @@

except IOError as inst:
    if inst.errno != errno.EPIPE:
        raise
  • ret = -1 finally: duration = util.timer() - starttime req.ui.flush()

Let's hold this. I plan to change the ret to be initialized to 1.

In D3561#56386, @yuja wrote:

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py

  • a/mercurial/dispatch.py

+++ b/mercurial/dispatch.py
@@ -230,7 +230,6 @@

except IOError as inst:
    if inst.errno != errno.EPIPE:
        raise
  • ret = -1 finally: duration = util.timer() - starttime req.ui.flush()

Let's hold this. I plan to change the ret to be initialized to 1.

Sounds good. I'll abandon this patch. I'll queue your patches in a minute when tests have finished running.

martinvonz abandoned this revision.May 16 2018, 12:26 PM