[Updated] D9371: bisect: use tuple literal instead of split on string literal

SimonSapin (Simon Sapin) phabricator at mercurial-scm.org
Wed Nov 25 05:45:31 UTC 2020


Closed by commit rHGe131dbf6ee15: bisect: use tuple literal instead of split on string literal (authored by SimonSapin).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D9371?vs=23628&id=23659

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9371/new/

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -999,7 +999,7 @@
     Returns 0 on success.
     """
     # backward compatibility
-    if rev in b"good bad reset init".split():
+    if rev in (b"good", b"bad", b"reset", b"init"):
         ui.warn(_(b"(use of 'hg bisect <cmd>' is deprecated)\n"))
         cmd, rev, extra = rev, extra, None
         if cmd == b"good":



To: SimonSapin, #hg-reviewers, Alphare, mharbison72
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201125/e409617e/attachment-0002.html>


More information about the Mercurial-patches mailing list