Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hg-windows-ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
hg-windows-ci
Commits
163fa0ae
Commit
163fa0ae
authored
7 years ago
by
Yuya Nishihara
Browse files
Options
Downloads
Patches
Plain Diff
dispatch: move initialization of sys.std* files
I'll add another Python 3 hack.
parent
b09b3eaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
contrib/hgperf
+0
-3
0 additions, 3 deletions
contrib/hgperf
hg
+1
-7
1 addition, 7 deletions
hg
mercurial/dispatch.py
+5
-0
5 additions, 0 deletions
mercurial/dispatch.py
with
6 additions
and
10 deletions
contrib/hgperf
+
0
−
3
View file @
163fa0ae
...
...
@@ -94,7 +94,4 @@
dispatch
.
runcommand
=
runcommand
for
fp
in
(
sys
.
stdin
,
sys
.
stdout
,
sys
.
stderr
):
util
.
setbinary
(
fp
)
dispatch
.
run
()
This diff is collapsed.
Click to expand it.
hg
+
1
−
7
View file @
163fa0ae
...
...
@@ -37,11 +37,5 @@
sys
.
stderr
.
write
(
"
(check your install and PYTHONPATH)
\n
"
)
sys
.
exit
(
-
1
)
from
mercurial
import
(
dispatch
,
util
,
)
for
fp
in
(
sys
.
stdin
,
sys
.
stdout
,
sys
.
stderr
):
util
.
setbinary
(
fp
)
from
mercurial
import
dispatch
dispatch
.
run
()
This diff is collapsed.
Click to expand it.
mercurial/dispatch.py
+
5
−
0
View file @
163fa0ae
...
...
@@ -75,6 +75,7 @@
def
run
():
"
run the command in sys.argv
"
_initstdio
()
req
=
request
(
pycompat
.
sysargv
[
1
:])
err
=
None
try
:
...
...
@@ -95,6 +96,10 @@
req
.
ui
.
ferr
.
flush
()
sys
.
exit
(
status
&
255
)
def
_initstdio
():
for
fp
in
(
sys
.
stdin
,
sys
.
stdout
,
sys
.
stderr
):
util
.
setbinary
(
fp
)
def
_getsimilar
(
symbols
,
value
):
sim
=
lambda
x
:
difflib
.
SequenceMatcher
(
None
,
value
,
x
).
ratio
()
# The cutoff for similarity here is pretty arbitrary. It should
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment