This is an archive of the discontinued Mercurial Phabricator instance.

split: use the new movedirstate() we now have in scmutil
ClosedPublic

Authored by martinvonz on Mar 13 2019, 2:39 PM.

Details

Summary

This avoids unnecessarily touching the working copy when splitting the
parent of the working copy. That also makes the test-removeemptydirs.t
case invalid, so we can just delete it.

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.Mar 13 2019, 2:39 PM
pulkit added a subscriber: pulkit.Mar 15 2019, 9:55 AM
pulkit added inline comments.
tests/test-removeemptydirs.t
269

Do we have other tests covering such cases?

This test might be helpful in future for someone changing some behavior around the dirstate handling code.

martinvonz marked an inline comment as done.Mar 15 2019, 10:14 AM
martinvonz added inline comments.
tests/test-removeemptydirs.t
269

Not for split. It just doesn't happen anymore, because split no longer touches the working directory. We have other tests for removed directories in this file.

pulkit accepted this revision.Mar 16 2019, 7:03 PM
martinvonz marked an inline comment as done.Mar 16 2019, 7:57 PM
This revision was automatically updated to reflect the committed changes.