Patchwork D1964: revsetlang: fix a doctest example on Python 3

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 8:04 p.m.
Message ID <differential-rev-PHID-DREV-kyugvm5s33rdx6opj2mj-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27107/
State Superseded
Headers show

Comments

phabricator - Feb. 1, 2018, 8:04 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because it's just some bytes prefixes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/revsetlang.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revsetlang.py b/mercurial/revsetlang.py
--- a/mercurial/revsetlang.py
+++ b/mercurial/revsetlang.py
@@ -635,7 +635,7 @@ 
     "root(_list('a\\\\x00b\\\\x00c\\\\x00d'))"
     >>> formatspec(b'sort(%r, %ps)', b':', [b'desc', b'user'])
     "sort((:), 'desc', 'user')"
-    >>> formatspec('%ls', ['a', "'"])
+    >>> formatspec(b'%ls', [b'a', b"'"])
     "_list('a\\\\x00\\\\'')"
     '''
     expr = pycompat.bytestr(expr)