HomePhabricator

uncommit: unify functions _uncommitdirstate and _unamenddirstate to one

Authored by pulkit.

Description

uncommit: unify functions _uncommitdirstate and _unamenddirstate to one

The _unamenddirstate() function was inspired by _uncommitdirstate() function as
the logic was same but we were unable to use the latter function directly. So
previous patch introduced the _unamenddirstate() function and now this patch
unifies both the function and we have a _fixdirstate() function.

Adding function in previous patch and unifying in a later patch makes the
reasoning easier and also leaves the last patch dedicated to what it is meant to
be.

Differential Revision: https://phab.mercurial-scm.org/D971

Details