Patchwork D9371: bisect: use tuple literal instead of split on string literal

login
register
mail settings
Submitter phabricator
Date Nov. 23, 2020, 5:18 p.m.
Message ID <differential-rev-PHID-DREV-qmethomznc45yllrnlyp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47651/
State Superseded
Headers show

Comments

phabricator - Nov. 23, 2020, 5:18 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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":