This is an archive of the discontinued Mercurial Phabricator instance.

branchmap: implement __contains__()
ClosedPublic

Authored by pulkit on Apr 5 2019, 9:31 AM.

Details

Summary

We have good occurences of if branch in branchmap() in our code. If
contains() is not implemented then it will use iter() to find whether
the element exists or not which is not good.

I am bit confused that whether I should move existing callers to hasbranch() or
this patch is a good way.

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

pulkit created this revision.Apr 5 2019, 9:31 AM
This revision was automatically updated to reflect the committed changes.