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

Authored by martinvonz on Mon, Jan 7, 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.
martinvonz created this revision.Mon, Jan 7, 3:45 AM
martinvonz updated this revision to Diff 13053.Mon, Jan 7, 2:02 PM
pulkit added a subscriber: pulkit.Thu, Jan 10, 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 updated this revision to Diff 13144.Thu, Jan 10, 4:50 PM
martinvonz edited the summary of this revision. (Show Details)
pulkit accepted this revision.Wed, Jan 16, 2:18 AM
This revision was automatically updated to reflect the committed changes.