( )⚙ D7337 index: use `index.get_rev` in `repoview.pinnedrevs`

This is an archive of the discontinued Mercurial Phabricator instance.

index: use `index.get_rev` in `repoview.pinnedrevs`
ClosedPublic

Authored by marmoute on Nov 8 2019, 11:25 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute created this revision.Nov 8 2019, 11:25 AM
indygreg added inline comments.
mercurial/repoview.py
64

Why was pinned.discard(None) added?

indygreg accepted this revision.Nov 8 2019, 5:23 PM
indygreg added inline comments.
mercurial/repoview.py
64

Nevermind. This get_rev() can return None.

This revision is now accepted and ready to land.Nov 8 2019, 5:23 PM
marmoute marked 2 inline comments as done.Nov 8 2019, 7:17 PM
marmoute added inline comments.
mercurial/repoview.py
64

Yeah, it is simpler to filter out None at the end than to do a lookup before adding to the set.

marmoute marked an inline comment as done.Nov 9 2019, 12:16 AM
marmoute updated this revision to Diff 17844.
This revision was automatically updated to reflect the committed changes.