Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
mercurial-devel
Commits
9fba795d
Commit
9fba795d
authored
13 years ago
by
Idan Kamara
Browse files
Options
Downloads
Patches
Plain Diff
dispatch: assign I/O descriptors from the request to the ui
parent
afccc64e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mercurial/dispatch.py
+20
-4
20 additions, 4 deletions
mercurial/dispatch.py
with
20 additions
and
4 deletions
mercurial/dispatch.py
+
20
−
4
View file @
9fba795d
...
...
@@ -28,8 +28,15 @@
def
dispatch
(
req
):
"
run the command specified in req.args
"
if
req
.
ferr
:
ferr
=
req
.
ferr
elif
req
.
ui
:
ferr
=
req
.
ui
.
ferr
else
:
ferr
=
sys
.
stderr
try
:
if
not
req
.
ui
:
req
.
ui
=
uimod
.
ui
()
if
'
--traceback
'
in
req
.
args
:
req
.
ui
.
setconfig
(
'
ui
'
,
'
traceback
'
,
'
on
'
)
...
...
@@ -31,6 +38,14 @@
try
:
if
not
req
.
ui
:
req
.
ui
=
uimod
.
ui
()
if
'
--traceback
'
in
req
.
args
:
req
.
ui
.
setconfig
(
'
ui
'
,
'
traceback
'
,
'
on
'
)
# set ui streams from the request
if
req
.
fin
:
req
.
ui
.
fin
=
req
.
fin
if
req
.
fout
:
req
.
ui
.
fout
=
req
.
fout
if
req
.
ferr
:
req
.
ui
.
ferr
=
req
.
ferr
except
util
.
Abort
,
inst
:
...
...
@@ -36,3 +51,3 @@
except
util
.
Abort
,
inst
:
sys
.
std
err
.
write
(
_
(
"
abort: %s
\n
"
)
%
inst
)
f
err
.
write
(
_
(
"
abort: %s
\n
"
)
%
inst
)
if
inst
.
hint
:
...
...
@@ -38,5 +53,5 @@
if
inst
.
hint
:
sys
.
std
err
.
write
(
_
(
"
(%s)
\n
"
)
%
inst
.
hint
)
f
err
.
write
(
_
(
"
(%s)
\n
"
)
%
inst
.
hint
)
return
-
1
except
error
.
ParseError
,
inst
:
if
len
(
inst
.
args
)
>
1
:
...
...
@@ -40,6 +55,6 @@
return
-
1
except
error
.
ParseError
,
inst
:
if
len
(
inst
.
args
)
>
1
:
sys
.
std
err
.
write
(
_
(
"
hg: parse error at %s: %s
\n
"
)
%
f
err
.
write
(
_
(
"
hg: parse error at %s: %s
\n
"
)
%
(
inst
.
args
[
1
],
inst
.
args
[
0
]))
else
:
...
...
@@ -44,4 +59,4 @@
(
inst
.
args
[
1
],
inst
.
args
[
0
]))
else
:
sys
.
std
err
.
write
(
_
(
"
hg: parse error: %s
\n
"
)
%
inst
.
args
[
0
])
f
err
.
write
(
_
(
"
hg: parse error: %s
\n
"
)
%
inst
.
args
[
0
])
return
-
1
...
...
@@ -47,4 +62,5 @@
return
-
1
return
_runcatch
(
req
)
def
_runcatch
(
req
):
...
...
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