Vladimir Kotal <Vladimir.Kotal at Sun.COM> writes: > Richard Lowe wrote: > > <snip> > >>>> 1. simple, just fix it > > I have taken care of that (CR 6726003). > >>>> 2. rewrite Cadmium [1] to behave like wx >> >> Somewhat, but not quite. I think we could possibly achieve something >> similar, but "like wx" is far too strong for how similar we possibly >> could be. > > By 'behave like wx' I meant the following changes to cdm.py: > - 'hg add' hook is processed by cdm which leads to an entry being > created in plaintext file (like 'wx/active') > - 'hg edit' adds new entry > - 'hg unedit' removes the entry in the plaintext file and restores > file from parent > - 'hg list' writes the contents of the plaintext file to stdout in > readable form > - etc. > > The idea is that basically all calls to > wslist[repo].active(opts['parent'])' should be replaced by internal > (to cdm) call which would access the plaintext file. > > Am I completely off or should there be a CR filed for this ? >
The basic theory "Cache things we're explicitly told, and run faster" holds, though with somewhat associated risk. The precise method outlined above falls flat. It is imperative the active list as seen by other things (think reci) is *correct*. Letting people influence that correctness is only going to cause more, and worse, problems for all concerned. -- Rich