Mercurial > hg
comparison hgext/convert/subversion.py @ 38068:c560a4ea6dac
py3: add b'' prefixes in hgext/convert/subversion.py
Litrerals starting with triple quotes or prepended with r'' do not get
prepended by b'' by the transformer.
# skip-blame because just adding b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3592
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 19 May 2018 18:24:36 +0530 |
parents | a8a902d7176e |
children | aac4be30e250 |
comparison
equal
deleted
inserted
replaced
38067:a40041caf8af | 38068:c560a4ea6dac |
---|---|
1079 except IOError: | 1079 except IOError: |
1080 raise error.Abort(_('Mercurial failed to run itself, check' | 1080 raise error.Abort(_('Mercurial failed to run itself, check' |
1081 ' hg executable is in PATH')) | 1081 ' hg executable is in PATH')) |
1082 return logstream(stdout) | 1082 return logstream(stdout) |
1083 | 1083 |
1084 pre_revprop_change = '''#!/bin/sh | 1084 pre_revprop_change = b'''#!/bin/sh |
1085 | 1085 |
1086 REPOS="$1" | 1086 REPOS="$1" |
1087 REV="$2" | 1087 REV="$2" |
1088 USER="$3" | 1088 USER="$3" |
1089 PROPNAME="$4" | 1089 PROPNAME="$4" |
1096 echo "Changing prohibited revision property" >&2 | 1096 echo "Changing prohibited revision property" >&2 |
1097 exit 1 | 1097 exit 1 |
1098 ''' | 1098 ''' |
1099 | 1099 |
1100 class svn_sink(converter_sink, commandline): | 1100 class svn_sink(converter_sink, commandline): |
1101 commit_re = re.compile(r'Committed revision (\d+).', re.M) | 1101 commit_re = re.compile(br'Committed revision (\d+).', re.M) |
1102 uuid_re = re.compile(r'Repository UUID:\s*(\S+)', re.M) | 1102 uuid_re = re.compile(br'Repository UUID:\s*(\S+)', re.M) |
1103 | 1103 |
1104 def prerun(self): | 1104 def prerun(self): |
1105 if self.wc: | 1105 if self.wc: |
1106 os.chdir(self.wc) | 1106 os.chdir(self.wc) |
1107 | 1107 |