Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
hg-git
Commits
7fb27f5d2c8d
Commit
7fb27f5d
authored
Sep 20, 2021
by
Dan Villiom Podlaski Christiansen
Browse files
pinnedrevs: handle missing nodes
parent
38651d6a59a6
Pipeline
#29455
failed with stages
in 10 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
hggit/hgrepo.py
View file @
7fb27f5d
...
...
@@ -81,5 +81,7 @@
# Mercurial pins bookmarks, even if obsoleted, so that they always
# appear in e.g. log; do the same with git tags and remotes.
if
repo
.
local
()
and
hasattr
(
repo
,
'githandler'
):
rev
=
repo
.
changelog
.
rev
# build up a list of applicable nodes
nodes
=
set
(
map
(
bin
,
repo
.
githandler
.
tags
.
values
()))
nodes
.
update
(
repo
.
githandler
.
remote_refs
.
values
())
...
...
@@ -85,5 +87,7 @@
pinned
.
update
(
rev
(
bin
(
r
))
for
r
in
repo
.
githandler
.
tags
.
values
())
pinned
.
update
(
rev
(
r
)
for
r
in
repo
.
githandler
.
remote_refs
.
values
())
# convert it to revs, taking care to handle unknown nodes
revs
=
set
(
map
(
repo
.
changelog
.
rev
,
filter
(
repo
.
__contains__
,
nodes
)))
pinned
.
update
(
revs
)
return
pinned
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment