[PATCH] phase: alway return a value

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jan 22 14:30:56 CST 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1327264209 -3600
# Branch stable
# Node ID 31e04e617785060f9c1887cdfab70ff4a6119756
# Parent  e35f10a8d795a1a8919f0db02cbe0ccc69d54c5c
phase: alway return a value

With the previous code, the phase command was returning None when displaying
phase and 0 or 1 when moving them.

This seemed an bit odd and displaying phase return 0 too now.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4249,7 +4249,7 @@
             else:
                 ui.warn(_('no phases changed\n'))
                 ret = 1
-        return ret
+    return ret
 
 def postincoming(ui, repo, modheads, optupdate, checkout):
     if modheads == 0:


More information about the Mercurial-devel mailing list