##// END OF EJS Templates
py3: use pycompat.byteskwargs in hgext/convert/...
Pulkit Goyal -
r36347:93943eef default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from mercurial import ('
18 encoding,
18 encoding,
19 error,
19 error,
20 phases,
20 phases,
21 pycompat,
21 util,
22 util,
22 )
23 )
23
24
@@ -322,6 +323,7 b' class commandline(object):'
322 pass
323 pass
323
324
324 def _cmdline(self, cmd, *args, **kwargs):
325 def _cmdline(self, cmd, *args, **kwargs):
326 kwargs = pycompat.byteskwargs(kwargs)
325 cmdline = [self.command, cmd] + list(args)
327 cmdline = [self.command, cmd] + list(args)
326 for k, v in kwargs.iteritems():
328 for k, v in kwargs.iteritems():
327 if len(k) == 1:
329 if len(k) == 1:
@@ -567,6 +567,7 b' class converter(object):'
567 self.map.close()
567 self.map.close()
568
568
569 def convert(ui, src, dest=None, revmapfile=None, **opts):
569 def convert(ui, src, dest=None, revmapfile=None, **opts):
570 opts = pycompat.byteskwargs(opts)
570 global orig_encoding
571 global orig_encoding
571 orig_encoding = encoding.encoding
572 orig_encoding = encoding.encoding
572 encoding.encoding = 'UTF-8'
573 encoding.encoding = 'UTF-8'
@@ -855,6 +855,7 b' def debugcvsps(ui, *args, **opts):'
855 repository, and convert the log to changesets based on matching
855 repository, and convert the log to changesets based on matching
856 commit log entries and dates.
856 commit log entries and dates.
857 '''
857 '''
858 opts = pycompat.byteskwargs(opts)
858 if opts["new_cache"]:
859 if opts["new_cache"]:
859 cache = "write"
860 cache = "write"
860 elif opts["update_cache"]:
861 elif opts["update_cache"]:
@@ -13,6 +13,7 b' import re'
13 from mercurial.i18n import _
13 from mercurial.i18n import _
14 from mercurial import (
14 from mercurial import (
15 error,
15 error,
16 pycompat,
16 util,
17 util,
17 )
18 )
18
19
@@ -89,6 +90,7 b' class monotone_source(common.converter_s'
89
90
90 def mtnrunstdio(self, *args, **kwargs):
91 def mtnrunstdio(self, *args, **kwargs):
91 # Prepare the command in automate stdio format
92 # Prepare the command in automate stdio format
93 kwargs = pycompat.byteskwargs(kwargs)
92 command = []
94 command = []
93 for k, v in kwargs.iteritems():
95 for k, v in kwargs.iteritems():
94 command.append("%s:%s" % (len(k), k))
96 command.append("%s:%s" % (len(k), k))
General Comments 0
You need to be logged in to leave comments. Login now