Commit 7fb27f5d authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

pinnedrevs: handle missing nodes

parent 38651d6a59a6
Pipeline #29455 failed with stages
in 10 minutes and 29 seconds
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment