This is an archive of the discontinued Mercurial Phabricator instance.

narrow: make dirstateguard back up and restore working copy narrowspec instead
ClosedPublic

Authored by martinvonz on Jan 7 2019, 3:45 AM.

Details

Summary

We used to have only one narrowspec for the store and the working
copy, but now that we have one narrowspec for each, it seems clear
that the dirstateguard was supposed to back up and restore the
narrowspec associated with the working copy, not the one associated
with the store.

clearbackup() (for the store narrowspec) is not needed because the
presence of the file in localrepository._journalfiles() takes care of
that.

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.Jan 7 2019, 3:45 AM
martinvonz updated this revision to Diff 13053.Jan 7 2019, 2:02 PM
pulkit added a subscriber: pulkit.Jan 10 2019, 1:52 PM

This one removes clearbackup() while restorebackup() and savebackup() are still there. Does that means that we are sure that we won't need to manually clear the backup from store?

In D5504#82068, @pulkit wrote:

This one removes clearbackup() while restorebackup() and savebackup() are still there. Does that means that we are sure that we won't need to manually clear the backup from store?

Good question. It just meant that clearbackup() is no longer called and I didn't think further :P I think this patch is still correct, but I'll insert a patch that adds journal.narrowspec to localrepository._journalfiles().

martinvonz edited the summary of this revision. (Show Details)Jan 10 2019, 4:50 PM
martinvonz updated this revision to Diff 13144.
pulkit accepted this revision.Jan 16 2019, 2:18 AM
This revision was automatically updated to reflect the committed changes.