This is an archive of the discontinued Mercurial Phabricator instance.

copies: clarify the return of _merge_copies_dict
ClosedPublic

Authored by Alphare on Nov 27 2020, 11:11 AM.

Details

Summary

I misused that function twice in the past few days, so lets clarify the API.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Alphare created this revision.Nov 27 2020, 11:11 AM
marmoute updated this revision to Diff 23816.Nov 29 2020, 6:13 AM
pulkit added a subscriber: pulkit.Nov 29 2020, 2:15 PM
pulkit added inline comments.
mercurial/copies.py
466

Is there any reason we will like to return this?

marmoute added inline comments.
mercurial/copies.py
466

Absolutely. It allow us to (update and) return whichever of the two dicts we prefer depending on the situation.

(it also make the code a bit clearer, since we don't have to remember which of the two dict argument get updated)

pulkit accepted this revision.Nov 30 2020, 11:39 AM
This revision is now accepted and ready to land.Nov 30 2020, 11:39 AM
This revision was automatically updated to reflect the committed changes.