Mercurial > hg
comparison hgext/convert/subversion.py @ 40215:4d6019c0e0ef
py3: use '%s' instead of %r in hgext/convert/subversion.py
Using '%r' on bytes in python 3 adds b'' prefixes to output which is bad. I
don't see a reason why we want to repr() the string here, so just switched to
'%s'. This fixes some output failure in one of the subversion test.
Differential Revision: https://phab.mercurial-scm.org/D5026
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sat, 13 Oct 2018 03:58:20 +0300 |
parents | 24e493ec2229 |
children | 1281b2265ff5 |
comparison
equal
deleted
inserted
replaced
40214:b456b2e0ad9f | 40215:4d6019c0e0ef |
---|---|
1136 else: | 1136 else: |
1137 if not re.search(br'^(file|http|https|svn|svn\+ssh)\://', path): | 1137 if not re.search(br'^(file|http|https|svn|svn\+ssh)\://', path): |
1138 path = os.path.realpath(path) | 1138 path = os.path.realpath(path) |
1139 if os.path.isdir(os.path.dirname(path)): | 1139 if os.path.isdir(os.path.dirname(path)): |
1140 if not os.path.exists(os.path.join(path, 'db', 'fs-type')): | 1140 if not os.path.exists(os.path.join(path, 'db', 'fs-type')): |
1141 ui.status(_('initializing svn repository %r\n') % | 1141 ui.status(_("initializing svn repository '%s'\n") % |
1142 os.path.basename(path)) | 1142 os.path.basename(path)) |
1143 commandline(ui, 'svnadmin').run0('create', path) | 1143 commandline(ui, 'svnadmin').run0('create', path) |
1144 created = path | 1144 created = path |
1145 path = util.normpath(path) | 1145 path = util.normpath(path) |
1146 if not path.startswith('/'): | 1146 if not path.startswith('/'): |
1147 path = '/' + path | 1147 path = '/' + path |
1148 path = 'file://' + path | 1148 path = 'file://' + path |
1149 | 1149 |
1150 wcpath = os.path.join(encoding.getcwd(), os.path.basename(path) + | 1150 wcpath = os.path.join(encoding.getcwd(), os.path.basename(path) + |
1151 '-wc') | 1151 '-wc') |
1152 ui.status(_('initializing svn working copy %r\n') | 1152 ui.status(_("initializing svn working copy '%s'\n") |
1153 % os.path.basename(wcpath)) | 1153 % os.path.basename(wcpath)) |
1154 self.run0('checkout', path, wcpath) | 1154 self.run0('checkout', path, wcpath) |
1155 | 1155 |
1156 self.wc = wcpath | 1156 self.wc = wcpath |
1157 self.opener = vfsmod.vfs(self.wc) | 1157 self.opener = vfsmod.vfs(self.wc) |