RFC: workingdir

Dirkjan Ochtman dirkjan at ochtman.nl
Sun Jun 6 09:12:11 CDT 2010


On Sun, Jun 6, 2010 at 14:08, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> My idea is to have a higher-level class representing the working
> directory. This could be a layer in between repo and dirstate, so that
> we have repo.wdir.dirstate. Ideally, the workingdir class would not
> know about the repo, though that's really the tricky part, and maybe
> an object cycle isn't so bad in this case (if it *is* allowed to know
> about the repo, that opens up more stuff we can put in there).

Benoit suggested looking at cmdutil, as well.

match: root, getcwd, ui
matchall: root, getcwd, ui
matchfiles: root, getcwd, ui
addremove: root, getcwd, wjoin, dirstate, ui, remove, add, copy, needs
workingctx and parentctx
copy: getcwd, root, walk, dirstate, pathto, wjoin, needs workingctx

These are all interesting candidates for moving into workingdir, and
this would resolve a circular import because patch currently imports
cmdutil for addremove.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list