Patchwork D7188: git: force using bytes in command name

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 4:39 p.m.
Message ID <differential-rev-PHID-DREV-fmi4al2ftlzzguhmwaef-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42653/
State Superseded
Headers show

Comments

phabricator - Nov. 1, 2019, 4:39 p.m.
maho created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS




To: maho, #hg-reviewers
Cc: mercurial-devel
phabricator - Jan. 30, 2020, 6:06 p.m.
This revision now requires changes to proceed.
baymax added a comment.
baymax requested changes to this revision.


  There seems to have been no activities on this Diff for the past 3 Months.
  
  By policy, we are automatically moving it out of the `need-review` state.
  
  Please, move it back to `need-review` without hesitation if this diff should still be discussed.
  
  :baymax:need-review-idle:

REPOSITORY
  rHG Mercurial

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

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

To: maho, #hg-reviewers, baymax
Cc: mercurial-devel
phabricator - March 3, 2020, 6:31 p.m.
durin42 added a comment.
durin42 added a reviewer: maho.
durin42 commandeered this revision.


  I've folded these into the base rev, thanks!

REPOSITORY
  rHG Mercurial

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

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

To: durin42, #hg-reviewers, baymax, maho
Cc: durin42, mercurial-devel

Patch

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -549,6 +549,8 @@ 
       extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks,
                              synopsis, docstring)
     '''
+    assert command == stringutil.forcebytestr(command), \
+        "`command` should be bytes(python3)/str(python2)"
     assert callable(wrapper)
     aliases, entry = cmdutil.findcmd(command, table)
     for alias, e in pycompat.iteritems(table):