This is an archive of the discontinued Mercurial Phabricator instance.

mergestate: move most of of reset() into start()
ClosedPublic

Authored by martinvonz on Sep 17 2020, 4:10 PM.

Details

Summary

ms.reset() has somehow become a combination of two different things:

  1. A constructor-like function creating an empty instance
  2. A call to shutil.rmtree() to clear the mergestate.

It seems that all callers now care only about the latter (since we
changed one caller to use the new ms.start() method instead). Let's
move the code for the former into start(), since that's the only
place it's needed.

Diff Detail

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

Event Timeline

martinvonz created this revision.Sep 17 2020, 4:10 PM
indygreg accepted this revision.Sep 17 2020, 10:18 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/mergestate.py
208

Ahhh - OK. This is much better.

This revision is now accepted and ready to land.Sep 17 2020, 10:18 PM
This revision was automatically updated to reflect the committed changes.