Patchwork D2350: py3: add b'' prefixes in fakedirstatewritetime.py

login
register
mail settings
Submitter phabricator
Date Feb. 20, 2018, 1:33 p.m.
Message ID <dc603009f47e7ed5347579e55b12906b@localhost.localdomain>
Download mbox | patch
Permalink /patch/28165/
State Not Applicable
Headers show

Comments

phabricator - Feb. 20, 2018, 1:33 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGac04f17b7041: py3: add b&#039;&#039; prefixes in fakedirstatewritetime.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2350?vs=5918&id=5928

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

AFFECTED FILES
  tests/fakedirstatewritetime.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/tests/fakedirstatewritetime.py b/tests/fakedirstatewritetime.py
--- a/tests/fakedirstatewritetime.py
+++ b/tests/fakedirstatewritetime.py
@@ -19,7 +19,7 @@ 
 configtable = {}
 configitem = registrar.configitem(configtable)
 
-configitem('fakedirstatewritetime', 'fakenow',
+configitem(b'fakedirstatewritetime', b'fakenow',
     default=None,
 )
 
@@ -39,7 +39,7 @@ 
 def fakewrite(ui, func):
     # fake "now" of 'pack_dirstate' only if it is invoked while 'func'
 
-    fakenow = ui.config('fakedirstatewritetime', 'fakenow')
+    fakenow = ui.config(b'fakedirstatewritetime', b'fakenow')
     if not fakenow:
         # Execute original one, if fakenow isn't configured. This is
         # useful to prevent subrepos from executing replaced one,
@@ -49,7 +49,7 @@ 
 
     # parsing 'fakenow' in YYYYmmddHHMM format makes comparison between
     # 'fakenow' value and 'touch -t YYYYmmddHHMM' argument easy
-    fakenow = util.parsedate(fakenow, ['%Y%m%d%H%M'])[0]
+    fakenow = util.parsedate(fakenow, [b'%Y%m%d%H%M'])[0]
 
     orig_pack_dirstate = parsers.pack_dirstate
     orig_dirstate_getfsnow = dirstate._getfsnow