This is an archive of the discontinued Mercurial Phabricator instance.

effectflag: detect when meta changed
ClosedPublic

Authored by lothiraldan on Aug 28 2017, 7:03 AM.

Details

Summary

Store in effect flag when the meta changed between the predecessor and its
successors. We blacklisted some known meta that would always changed when
another flag change. For example rebase would always add a meta rebase-source
while the effect flag parents will already detect this situation.

It can happens with various hg commands.

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

lothiraldan created this revision.Aug 28 2017, 7:03 AM
lothiraldan updated this revision to Diff 2111.Sep 27 2017, 4:08 AM
martinvonz added inline comments.
mercurial/obsutil.py
327–330

"ismetablacklisted" and "...does *not* match ... blacklist" seems confusing. Shouldn't this function be called notmetablacklisted or metanotblacklisted or similar?

332–336

I think this is both shorter and clearer (but not tested):

return not any(pattern.match(metakey) for pattern in METABLACKLIST)
lothiraldan added inline comments.Oct 1 2017, 6:28 AM
mercurial/obsutil.py
327–330

Right, I think I reversed the return values without changing the name, I will find something.

lothiraldan updated this revision to Diff 2257.Oct 1 2017, 7:52 AM
lothiraldan marked 3 inline comments as done.Oct 1 2017, 7:57 AM
This revision was automatically updated to reflect the committed changes.