This is an archive of the discontinued Mercurial Phabricator instance.

bookmarks: add support for `mirror` mode to `incoming`
ClosedPublic

Authored by marmoute on Oct 15 2021, 4:18 AM.

Details

Summary

This is more consistent.

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.Oct 15 2021, 4:18 AM
spectral added inline comments.
mercurial/bookmarks.py
816

I find the single line version of these functions much easier to read.

825

Nit: use set(localmarks) instead of set(repo._bookmarks)?

Also, perhaps I'm less familiar with idiomatic python and this isn't confusing for others, but would it make sense to explicitly use .keys() (so we have allmarks = set(remotemarks.keys()) | set(localmarks.keys())? It would have likely avoided a small amount of confusion I had a few lines below.

marmoute added inline comments.Oct 17 2021, 9:11 AM
mercurial/bookmarks.py
825

I think set(dict) is quite idiomatic, but using .keys is indeed clearer so lets do it.

marmoute updated this revision to Diff 30846.Oct 17 2021, 6:41 PM
spectral accepted this revision.Oct 17 2021, 7:34 PM
marmoute updated this revision to Diff 30851.Oct 18 2021, 3:21 AM
Alphare accepted this revision.Oct 18 2021, 6:05 AM
This revision is now accepted and ready to land.Oct 18 2021, 6:05 AM
This revision was automatically updated to reflect the committed changes.