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
26e413f5
Commit
26e413f5
authored
14 years ago
by
Brodie Rao
Browse files
Options
Downloads
Patches
Plain Diff
hgcia/color: remove star imports
This plays nicer with demandimport and allows pyflakes to detect undefined names.
parent
e627fef9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/color.py
+22
-21
22 additions, 21 deletions
hgext/color.py
hgext/hgcia.py
+1
-1
1 addition, 1 deletion
hgext/hgcia.py
with
23 additions
and
22 deletions
hgext/color.py
+
22
−
21
View file @
26e413f5
...
...
@@ -216,10 +216,9 @@
_
(
'
TYPE
'
)))
try
:
import
re
,
pywintypes
from
win32console
import
*
import
re
,
pywintypes
,
win32console
as
win32c
# http://msdn.microsoft.com/en-us/library/ms682088%28VS.85%29.aspx
w32effects
=
{
'
none
'
:
0
,
'
black
'
:
0
,
...
...
@@ -221,14 +220,15 @@
# http://msdn.microsoft.com/en-us/library/ms682088%28VS.85%29.aspx
w32effects
=
{
'
none
'
:
0
,
'
black
'
:
0
,
'
red
'
:
FOREGROUND_RED
,
'
green
'
:
FOREGROUND_GREEN
,
'
yellow
'
:
FOREGROUND_RED
|
FOREGROUND_GREEN
,
'
blue
'
:
FOREGROUND_BLUE
,
'
magenta
'
:
FOREGROUND_BLUE
|
FOREGROUND_RED
,
'
cyan
'
:
FOREGROUND_BLUE
|
FOREGROUND_GREEN
,
'
white
'
:
FOREGROUND_RED
|
FOREGROUND_GREEN
|
FOREGROUND_BLUE
,
'
bold
'
:
FOREGROUND_INTENSITY
,
'
red
'
:
win32c
.
FOREGROUND_RED
,
'
green
'
:
win32c
.
FOREGROUND_GREEN
,
'
yellow
'
:
win32c
.
FOREGROUND_RED
|
win32c
.
FOREGROUND_GREEN
,
'
blue
'
:
win32c
.
FOREGROUND_BLUE
,
'
magenta
'
:
win32c
.
FOREGROUND_BLUE
|
win32c
.
FOREGROUND_RED
,
'
cyan
'
:
win32c
.
FOREGROUND_BLUE
|
win32c
.
FOREGROUND_GREEN
,
'
white
'
:
(
win32c
.
FOREGROUND_RED
|
win32c
.
FOREGROUND_GREEN
|
win32c
.
FOREGROUND_BLUE
),
'
bold
'
:
win32c
.
FOREGROUND_INTENSITY
,
'
black_background
'
:
0
,
...
...
@@ -234,13 +234,14 @@
'
black_background
'
:
0
,
'
red_background
'
:
BACKGROUND_RED
,
'
green_background
'
:
BACKGROUND_GREEN
,
'
yellow_background
'
:
BACKGROUND_RED
|
BACKGROUND_GREEN
,
'
blue_background
'
:
BACKGROUND_BLUE
,
'
purple_background
'
:
BACKGROUND_BLUE
|
BACKGROUND_RED
,
'
cyan_background
'
:
BACKGROUND_BLUE
|
BACKGROUND_GREEN
,
'
white_background
'
:
BACKGROUND_RED
|
BACKGROUND_GREEN
|
BACKGROUND_BLUE
,
'
bold_background
'
:
BACKGROUND_INTENSITY
,
'
underline
'
:
COMMON_LVB_UNDERSCORE
,
# double-byte charsets only
'
inverse
'
:
COMMON_LVB_REVERSE_VIDEO
,
# double-byte charsets only
'
red_background
'
:
win32c
.
BACKGROUND_RED
,
'
green_background
'
:
win32c
.
BACKGROUND_GREEN
,
'
yellow_background
'
:
win32c
.
BACKGROUND_RED
|
win32c
.
BACKGROUND_GREEN
,
'
blue_background
'
:
win32c
.
BACKGROUND_BLUE
,
'
purple_background
'
:
win32c
.
BACKGROUND_BLUE
|
win32c
.
BACKGROUND_RED
,
'
cyan_background
'
:
win32c
.
BACKGROUND_BLUE
|
win32c
.
BACKGROUND_GREEN
,
'
white_background
'
:
(
win32c
.
BACKGROUND_RED
|
win32c
.
BACKGROUND_GREEN
|
win32c
.
BACKGROUND_BLUE
),
'
bold_background
'
:
win32c
.
BACKGROUND_INTENSITY
,
'
underline
'
:
win32c
.
COMMON_LVB_UNDERSCORE
,
# double-byte charsets only
'
inverse
'
:
win32c
.
COMMON_LVB_REVERSE_VIDEO
,
# double-byte charsets only
}
...
...
@@ -245,6 +246,6 @@
}
stdout
=
GetStdHandle
(
STD_OUTPUT_HANDLE
)
stdout
=
win32c
.
GetStdHandle
(
win32c
.
STD_OUTPUT_HANDLE
)
try
:
origattr
=
stdout
.
GetConsoleScreenBufferInfo
()[
'
Attributes
'
]
except
pywintypes
.
error
:
...
...
This diff is collapsed.
Click to expand it.
hgext/hgcia.py
+
1
−
1
View file @
26e413f5
...
...
@@ -40,7 +40,7 @@
"""
from
mercurial.i18n
import
_
from
mercurial.node
import
*
from
mercurial.node
import
bin
,
short
from
mercurial
import
cmdutil
,
patch
,
templater
,
util
,
mail
import
email.Parser
...
...
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