py3: explicitly convert a list to bytes to pass in ui.debug
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 04 May 2017 00:23:09 +0530
changeset 32348 e8569cc131d1
parent 32347 3caec778774b
child 32349 16a5cb4eedb7
py3: explicitly convert a list to bytes to pass in ui.debug Here pats is a list obviously. Since we can't pass unicodes to ui.debug, we have to pass this as bytes.
hgext/largefiles/overrides.py
tests/test-largefiles-misc.t
tests/test-log.t
--- a/hgext/largefiles/overrides.py	Wed May 17 20:14:27 2017 -0700
+++ b/hgext/largefiles/overrides.py	Thu May 04 00:23:09 2017 +0530
@@ -379,7 +379,7 @@
             return r
         m.matchfn = lfmatchfn
 
-        ui.debug('updated patterns: %s\n' % sorted(pats))
+        ui.debug('updated patterns: %s\n' % ', '.join(sorted(pats)))
         return m, pats
 
     # For hg log --patch, the match object is used in two different senses:
--- a/tests/test-largefiles-misc.t	Wed May 17 20:14:27 2017 -0700
+++ b/tests/test-largefiles-misc.t	Thu May 04 00:23:09 2017 +0530
@@ -479,7 +479,7 @@
   summary:     anotherlarge
   
   $ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge
-  updated patterns: ['../.hglf/sub/../sub/anotherlarge', '../sub/anotherlarge']
+  updated patterns: ../.hglf/sub/../sub/anotherlarge, ../sub/anotherlarge
   1: anotherlarge
 
   $ hg log -G anotherlarge
@@ -498,18 +498,18 @@
   summary:     anotherlarge
   
   $ hg --debug log -T '{rev}: {desc}\n' -G glob:another*
-  updated patterns: ['glob:../.hglf/sub/another*', 'glob:another*']
+  updated patterns: glob:../.hglf/sub/another*, glob:another*
   @  1: anotherlarge
   |
   ~
 
 #if no-msys
   $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
-  updated patterns: ['glob:../.hglf/sub/another*']
+  updated patterns: glob:../.hglf/sub/another*
   1: anotherlarge
 
   $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
-  updated patterns: ['glob:../.hglf/sub/another*']
+  updated patterns: glob:../.hglf/sub/another*
   @  1: anotherlarge
   |
   ~
@@ -557,10 +557,10 @@
 
 Log from outer space
   $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge'
-  updated patterns: ['addrm2/.hglf/sub/anotherlarge', 'addrm2/sub/anotherlarge']
+  updated patterns: addrm2/.hglf/sub/anotherlarge, addrm2/sub/anotherlarge
   1: anotherlarge
   $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge'
-  updated patterns: ['addrm2/.hglf/sub/anotherlarge']
+  updated patterns: addrm2/.hglf/sub/anotherlarge
   1: anotherlarge
 
 
--- a/tests/test-log.t	Wed May 17 20:14:27 2017 -0700
+++ b/tests/test-log.t	Thu May 04 00:23:09 2017 +0530
@@ -47,7 +47,7 @@
 
 Make sure largefiles doesn't interfere with logging a regular file
   $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles=
-  updated patterns: ['.hglf/a', 'a']
+  updated patterns: .hglf/a, a
   0: a
   $ hg log a
   changeset:   0:9161b9aeaf16
@@ -67,7 +67,7 @@
   summary:     a
   
   $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles=
-  updated patterns: ['glob:.hglf/a*', 'glob:a*']
+  updated patterns: glob:.hglf/a*, glob:a*
   3: d
   0: a