[PATCH 2 of 3] move store walking from streamclone.py into store.py
Adrian Buehlmann
adrian at cadifra.com
Mon Jul 21 17:11:00 CDT 2008
On 21.07.2008 23:19, Matt Mackall wrote:
> Pass an opener to store?
But that conflicts with the stores creating the openers
(directstore, encodedstore, fnlogstore).
statichttprepo is just odd in multiple ways.
Does statichttprepo really have a store at all (in a
conceptual sense)?
(statichttprepo derives from localrepository, but it isn't
a localrepository in a conceptual sense)
For example, statichttprepo is not local:
def local(self):
return False
Maybe we should say that only local repos do have
a store?
fnlogstore maintains an intimate relationship with
its opener (class _loggingopener) to collect the newly
created files. That's why it needs to create its opener
itself.
A key point is really how to detect the newly created
files (see my very first "not allowed to talk to" [1], where
I tried to implement a notification from filelog to repo in
a very early attempt [2]).
(In C++ I would have used Robert C. Martin's dependency inversion [3]
for that, by introducing an abstract interface, which repo would
implement)
[1] http://selenic.com/pipermail/mercurial-devel/2008-July/007054.html
[2] http://selenic.com/pipermail/mercurial-devel/2008-July/007049.html
[3] http://www.objectmentor.com/resources/articles/dip.pdf
More information about the Mercurial-devel
mailing list