eric6/Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 8205
4a0f1f896341
parent 8143
2c730d5fd177
child 8220
006ee31b4835
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Apr 08 18:27:47 2021 +0200
@@ -2424,15 +2424,17 @@
         if data:
             revs, phase, force = data
             
+            if phase not in ("p", "d", "s"):
+                raise ValueError("Invalid phase given.")
+            
             args = self.initCommand("phase")
             if phase == "p":
                 args.append("--public")
             elif phase == "d":
                 args.append("--draft")
-            elif phase == "s":
+            else:
                 args.append("--secret")
-            else:
-                raise ValueError("Invalid phase given.")
+            
             if force:
                 args.append("--force")
             for rev in revs:

eric ide

mercurial