[Bug 5767] New: python3 hg status causes less to emit a "Number is required after -b" waring

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Sat Jan 6 09:31:36 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5767

            Bug ID: 5767
           Summary: python3 hg status causes less to emit a "Number is
                    required after -b" waring
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: normal
         Component: pager
          Assignee: bugzilla at mercurial-scm.org
          Reporter: shlomif at shlomifish.org
                CC: mercurial-devel at mercurial-scm.org

shlomif at telaviv1:~/Download/unpack/file/vcs/hg$ python3.6 hg status
Number is required after -b
There is no -' option ("less --help" for help)
-  (press RETURN)

it is fine with python2.

This tentative change fixes it for both versions:

diff -r 31fe397f2bda mercurial/util.py
--- a/mercurial/util.py Wed Dec 27 00:24:53 2017 +0530
+++ b/mercurial/util.py Sat Jan 06 16:31:02 2018 +0200
@@ -1153,7 +1153,7 @@
             return '0'
         if val is True:
             return '1'
-        return str(val)
+        return val.decode('utf-8')
     env = dict(encoding.environ)
     if environ:
         env.update((k, py2shell(v)) for k, v in environ.iteritems())

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list