This is an archive of the discontinued Mercurial Phabricator instance.

shelve: introduce class representing a shelf
ClosedPublic

Authored by martinvonz on Jan 8 2021, 3:36 PM.

Details

Summary

I'm about to make phase-based shelve not write .hg and .patch
files. Having a class that represents a single shelf, regardless of
which files it uses will help. I'm starting small with just a
.exists() function. I plan to eventually remove the shelvedfile
class once all functionality has been moved to the new class.

By the way, I know that things you shelve are not typically themselves
shelves. I still picked Shelf for the class because it's short
(compared to e.g. ShelvedChange).

Diff Detail

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

Event Timeline

martinvonz created this revision.Jan 8 2021, 3:36 PM
martinvonz edited the summary of this revision. (Show Details)Jan 11 2021, 1:04 PM
martinvonz planned changes to this revision.Jan 11 2021, 5:32 PM

As I'm working on further changes on top of this series, I'm starting to wonder if I should pass in a vfs into the Shelf class instead. I'll mark this as "changes planned" while I figure that out.

martinvonz requested review of this revision.Jan 12 2021, 5:52 PM

As I'm working on further changes on top of this series, I'm starting to wonder if I should pass in a vfs into the Shelf class instead. I'll mark this as "changes planned" while I figure that out.

I made that change later in the stack instead, in D9738.

pulkit accepted this revision.Jan 16 2021, 4:19 AM
This revision is now accepted and ready to land.Jan 16 2021, 4:19 AM
This revision was automatically updated to reflect the committed changes.