Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mercurial-path_pattern
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
mercurial-path_pattern
Commits
a4014cec155c
Commit
a4014cec155c
authored
9 years ago
by
Marcin Kasperski
Browse files
Options
Downloads
Patches
Plain Diff
Debugging notes and warningsare prefixed with path_pattern:
parent
f152b740f16d
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
path_pattern.py
+7
-7
7 additions, 7 deletions
path_pattern.py
with
7 additions
and
7 deletions
path_pattern.py
+
7
−
7
View file @
a4014cec
...
...
@@ -102,7 +102,7 @@
if
match
:
value
=
self
.
remote
.
fill
(
**
match
)
if
not
value
:
ui
.
warn
(
_
(
"
Invalid
path
pattern - markers mismatch between %s.local and %s.remote
\n
"
)
ui
.
warn
(
_
(
"
path_pattern:
Invalid pattern - markers mismatch between %s.local and %s.remote
\n
"
)
%
(
self
.
alias
,
self
.
alias
))
return
value
...
...
@@ -121,7 +121,7 @@
(
"
remote
"
,
self
.
remote
)]:
if
not
obj
:
ui
.
warn
(
_
(
"
Incomplete
path
pattern - missing %s.%s
\n
"
)
%
(
self
.
alias
,
name
))
_
(
"
path_pattern:
Incomplete pattern - missing %s.%s
\n
"
)
%
(
self
.
alias
,
name
))
return
False
if
not
obj
.
is_valid
():
ui
.
warn
(
...
...
@@ -125,7 +125,7 @@
return
False
if
not
obj
.
is_valid
():
ui
.
warn
(
_
(
"
Invalid
path
pattern %s.%s - bad syntax
"
)
%
(
self
.
alias
,
name
))
_
(
"
path_pattern:
Invalid pattern %s.%s - bad syntax
"
)
%
(
self
.
alias
,
name
))
return
False
return
True
...
...
@@ -146,9 +146,9 @@
for
alias
,
value
in
meu
.
suffix_config_items
(
ui
,
"
path_pattern
"
,
"
local
"
):
if
alias
not
in
self
.
patterns
:
self
.
patterns
[
alias
]
=
PatternPair
(
alias
)
ui
.
debug
(
_
(
"
Parsing local side of path pattern %s
"
)
%
alias
)
ui
.
debug
(
_
(
"
path_pattern:
Parsing local side of path pattern %s
"
)
%
alias
)
self
.
patterns
[
alias
].
learn_local
(
value
,
ui
)
# Read «sth».remote
for
alias
,
value
in
meu
.
suffix_config_items
(
ui
,
"
path_pattern
"
,
"
remote
"
):
if
alias
not
in
self
.
patterns
:
self
.
patterns
[
alias
]
=
PatternPair
(
alias
)
...
...
@@ -150,9 +150,9 @@
self
.
patterns
[
alias
].
learn_local
(
value
,
ui
)
# Read «sth».remote
for
alias
,
value
in
meu
.
suffix_config_items
(
ui
,
"
path_pattern
"
,
"
remote
"
):
if
alias
not
in
self
.
patterns
:
self
.
patterns
[
alias
]
=
PatternPair
(
alias
)
ui
.
debug
(
_
(
"
Parsing remote side of path pattern %s
"
)
%
alias
)
ui
.
debug
(
_
(
"
path_pattern:
Parsing remote side of path pattern %s
"
)
%
alias
)
self
.
patterns
[
alias
].
learn_remote
(
value
,
ui
)
# Read «sth».enforce
for
alias
,
value
in
meu
.
suffix_configbool_items
(
ui
,
"
path_pattern
"
,
"
enforce
"
):
...
...
@@ -176,5 +176,5 @@
expanded
=
pattern_pair
.
lookup_remote
(
repo
.
root
,
ui
)
if
expanded
:
if
(
not
pattern_pair
.
enforce
)
and
(
path_name
in
known_paths
):
ui
.
debug
(
_
(
"
Ignoring path pattern %s as repo %s has own path of this name
\n
"
)
%
(
path_name
,
repo
.
root
))
ui
.
debug
(
_
(
"
path_pattern:
Ignoring path pattern %s as repo %s has own path of this name
\n
"
)
%
(
path_name
,
repo
.
root
))
else
:
...
...
@@ -180,5 +180,5 @@
else
:
ui
.
debug
(
_
(
"
Defining path %s as %s
\n
"
)
%
(
path_name
,
expanded
))
ui
.
debug
(
_
(
"
path_pattern:
Defining path %s as %s
\n
"
)
%
(
path_name
,
expanded
))
ui
.
setconfig
(
"
paths
"
,
path_name
,
expanded
)
def
print_patterns
(
self
,
ui
,
list_repos
=
False
):
...
...
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