Page MenuHomePhabricator

fix: use scmutil.movedirstate() instead of reimplementing
ClosedPublic

Authored by martinvonz on Jul 23 2021, 3:16 AM.

Details

Summary

I wrote this patch 2 years ago as a little cleanup. I wanted to
generally used scmutil.movedirstate() instead of manually updating
the dirstate because that is easy to get wrong. I didn't know until
today that the current code had a bug. So I added the test case two
patches before this one and dusted off this one patch. This is a
little slower than the previous code, as it diffs two
manifests. However, it fixes the bug and I don't think it's going to
be noticeably slower anyway.

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

martinvonz created this revision.Jul 23 2021, 3:16 AM
martinvonz planned changes to this revision.Jul 23 2021, 3:19 AM

This is slower, but probably doesn't matter?

Oops, I meant to update that message. These patches are from 2 years ago. I just didn't have much reason to send them until a user ran into the bug added in the grandparent change (which is not from 2 years ago; I didn't know that this series fixed any bugs until today).

martinvonz edited the summary of this revision. (Show Details)Jul 23 2021, 3:24 AM
martinvonz requested review of this revision.Jul 23 2021, 3:24 AM
pulkit accepted this revision.Jul 24 2021, 5:19 AM
This revision is now accepted and ready to land.Jul 24 2021, 5:19 AM