This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: update backup functions to take full backup filename
ClosedPublic

Authored by simpkins on Jul 12 2017, 7:01 PM.

Details

Summary

Update the dirstate functions so that the caller supplies the full backup
filename rather than just a prefix and suffix.

The localrepo code was already hard-coding the fact that the backup name must
be (exactly prefix + "dirstate" + suffix): it relied on this in _journalfiles()
and undofiles(). Making the caller responsible for specifying the full backup
name removes the need for the localrepo code to assume that dirstate._filename
is always "dirstate".

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

simpkins created this revision.Jul 12 2017, 7:01 PM
phillco accepted this revision.Jul 13 2017, 3:55 PM
phillco added a subscriber: phillco.

lgtm

durin42 accepted this revision.Jul 14 2017, 11:54 AM
This revision is now accepted and ready to land.Jul 14 2017, 11:54 AM
This revision was automatically updated to reflect the committed changes.