Patchwork D5684: py3: fix test-update-atomic.t

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2019, 8:37 p.m.
Message ID <063d9ce5ccb1fd46db7b6ed24b727334@localhost.localdomain>
Download mbox | patch
Permalink /patch/38002/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2019, 8:37 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG40787a96fda7: py3: fix test-update-atomic.t (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5684?vs=13423&id=13428

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

AFFECTED FILES
  contrib/python3-whitelist
  tests/test-update-atomic.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-update-atomic.t b/tests/test-update-atomic.t
--- a/tests/test-update-atomic.t
+++ b/tests/test-update-atomic.t
@@ -10,20 +10,24 @@ 
   > 
   > for file_path in sys.argv[1:]:
   >     file_stat = os.stat(file_path)
-  >     octal_mode = oct(file_stat[ST_MODE] & 0o777)
+  >     octal_mode = oct(file_stat[ST_MODE] & 0o777).replace('o', '')
   >     print("%s:%s" % (file_path, octal_mode))
   > 
   > EOF
 
   $ hg init repo
   $ cd repo
 
   $ cat > .hg/showwrites.py <<EOF
+  > from __future__ import print_function
+  > from mercurial import pycompat
+  > from mercurial.utils import stringutil
   > def uisetup(ui):
   >   from mercurial import vfs
   >   class newvfs(vfs.vfs):
   >     def __call__(self, *args, **kwargs):
-  >       print('vfs open', args, sorted(list(kwargs.items())))
+  >       print(pycompat.sysstr(stringutil.pprint(
+  >           ('vfs open', args, sorted(list(kwargs.items()))))))
   >       return super(newvfs, self).__call__(*args, **kwargs)
   >   vfs.vfs = newvfs
   > EOF
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -690,6 +690,7 @@ 
 test-unionrepo.t
 test-unrelated-pull.t
 test-up-local-change.t
+test-update-atomic.t
 test-update-branches.t
 test-update-dest.t
 test-update-issue1456.t