This is an archive of the discontinued Mercurial Phabricator instance.

fold: invalidate false cache
AbandonedPublic

Authored by felixmerk on Aug 14 2017, 8:11 PM.
Tags
None
Subscribers

Details

Reviewers
quark
Group Reviewers
Restricted Project
Summary

hg fold left mercurial with the wrong cache state at the end of running, which
means if we ran something within the same process we could run into issues.
This bug affected hg undo, which is why the tests specifically check for their
interaction.

Test Plan

unit tests

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

felixmerk created this revision.Aug 14 2017, 8:11 PM
Herald added a reviewer: Restricted Project. ยท View Herald TranscriptAug 14 2017, 8:11 PM
quark accepted this revision.Aug 14 2017, 9:09 PM
quark added a subscriber: quark.

Nice! Upon further investigation I suspect other commands have a similar issue. It seems localrepo.transaction may be responsible for that.

This revision is now accepted and ready to land.Aug 14 2017, 9:09 PM
quark added a comment.Aug 14 2017, 9:25 PM

Actually it's more complex than that - For example, update might affect visibility but it does not even use a transaction. So I think we have to invalidate these cache in undo code.

felixmerk abandoned this revision.Aug 14 2017, 9:49 PM

This solution doesn't handle the general case.