Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 30641:16b5df5792a8
py3: replace sys.platform with pycompat.sysplatform (part 1 of 2)
sys.platform returns unicode on python 3 world. Our code base has most of the
things bytes because of the transformer. So we have a bytes version of this as
pycompat.sysplatform. This series of 2 patches replaces occurences of
sys.platform with pycompat.sysplatform.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 02:15:24 +0530 |
parents | 344e68882cd3 |
children | b96c57c1f860 |
comparison
equal
deleted
inserted
replaced
30640:7a3e67bfa417 | 30641:16b5df5792a8 |
---|---|
1084 self.write_err(''.join(output)) | 1084 self.write_err(''.join(output)) |
1085 return self.tracebackflag or force | 1085 return self.tracebackflag or force |
1086 | 1086 |
1087 def geteditor(self): | 1087 def geteditor(self): |
1088 '''return editor to use''' | 1088 '''return editor to use''' |
1089 if sys.platform == 'plan9': | 1089 if pycompat.sysplatform == 'plan9': |
1090 # vi is the MIPS instruction simulator on Plan 9. We | 1090 # vi is the MIPS instruction simulator on Plan 9. We |
1091 # instead default to E to plumb commit messages to | 1091 # instead default to E to plumb commit messages to |
1092 # avoid confusion. | 1092 # avoid confusion. |
1093 editor = 'E' | 1093 editor = 'E' |
1094 else: | 1094 else: |