Hi Masatake! Thanks for reviewing the actual dvc code.
> Stefan, I have some questions/comments about DVC layering. > > For me, it seems that DVC layering and xhg layers are cyclic. > > e.g. > > (defun xhg-dvc-log (arg) > "Shows the changelog in the current Mercurial tree. > ARG is passed as prefix argument" > (call-interactively 'xhg-log)) > > xhg-dvc-log in xhg-core.el uses xhg-log in xhg.el. > In other word xhg-core.el depends on xhg.el. > I think the relation should be reversed: xhg.el > should depend on xhg-core.el. Am I wrong? I see your point. xhg-core should be named xhg-dvc.el in your naming convention. I just named the file core, because it implements the core functionality for the dvc layer. > Another thing I don't understand is line > > ;;; Code: > (require 'xhg) > > in dvc-unified.el. > > I think ideally dvc*.el should not depend on any concrete > version control systems' code; xhg, xtla, etc. > Am I wrong? You are right, the require statement is wrong there. > After the questions hitting me, I think at least following three > files are needed for each concrete version concrete system code: > > xfoo-core.el: Provides facility for xfoo.el > This can use dvc code if necessary. > > xfoo-dvc.el: Registers xfoo to dvc. This provide > (or dvc-xfoo.el) xfoo functions which is required by dvc. > This may require both xfoo-core.el and xfoo.el. > > xfoo.el: Rather user interface layer of xfoo. > xfoo uses xfoo-core and dvc. > xfoo.el provides user interfaces not covered by > dvc-unified. > user interfaces covered by dvc-unified may be > implemented xfoo.el. However, xfoo-dvc exports > them to dvc. That layering makes sense. So I will split the xhg-core.el to xhg-core.el and xhg-dvc.el. > Just another thing. > Symbols in xhg-core.el use `xhg' as prefix. The prefix includes `x'. > In other hand, symbols in xtla-core.el use tla as prefix. The prefix > doesn't include `x'. About darcs, my target, which I should use > xdarcs or darcs as perfix? I think I should use xdarcs because > there are some dracs frontends for emacs. xdracs is good for avoiding > symbol name conflicts. Do you think tla- is special case? I think we should take a not already used prefix. So I would choose xdarcs for darcs. And I think tla- is a special case. Perhaps we will reach a similar state for other revision control interfaces also, as soon as we provide the functionality of the existing interfaces. Stefan.
