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
773852b7ff0c
Commit
773852b7ff0c
authored
11 months ago
by
Pierre-Yves David
Browse files
Options
Downloads
Patches
Plain Diff
phases: introduce a performant efficient way to access revision in a set
This will be useful in the next changesets.
parent
821c45fec2c4
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/phases.py
+21
-0
21 additions, 0 deletions
mercurial/phases.py
with
21 additions
and
0 deletions
mercurial/phases.py
+
21
−
0
View file @
773852b7
...
...
@@ -414,6 +414,27 @@
]
)
def
get_raw_set
(
self
,
repo
:
"
localrepo.localrepository
"
,
phase
:
int
,
)
->
Set
[
int
]:
"""
return the set of revision in that phase
The returned set is not filtered and might contains revision filtered
for the passed repoview.
The returned set might be the internal one and MUST NOT be mutated to
avoid side effect.
"""
if
phase
==
public
:
raise
error
.
ProgrammingError
(
"
cannot get_set for public phase
"
)
self
.
_ensure_phase_sets
(
repo
.
unfiltered
())
revs
=
self
.
_phasesets
.
get
(
phase
)
if
revs
is
None
:
return
set
()
return
revs
def
getrevset
(
self
,
repo
:
"
localrepo.localrepository
"
,
...
...
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