darcs is just about perfect except for one thing, not having a straightforward
way to compose repositories. I know this issue has been discussed quite a bit
but I think I have a very lightweight proposal to mitigate this problem.
darcs itself has amazing compositional capabilities, with its ability to pull
patches back and forth between repositories, so a natural way to compose darcs
projects is to simply pull the patches from both into your composed repository.
The main issues are the various pitfalls that this admits, if you ever
accidentally create a patch that crosses module boundries, it becomes very
difficult to migrate that patch back into the original repos. it is also a pain
to choose just the right patches to push and pull between your module's repos
and the main one. Even if you are extremely careful to never create a patch
crossing one of these boundries, you can't trust every contributer will.
meaning you have to ask them to resubmit patches, or redo them yourself, or
accidentally let them through and then have a very sticky situation once you
realized what happened and had several patched depend on the 'poisoned'
patches.
I propose no change to the repo format or new patch types or anything that
would break compatability.
basically, I want to be able to declare 'domains' which are simply mutually
exclusive sets of files in a repository. The main new behavior is that 'darcs
record' will refuse to create a patch that crosses domain boundries.
more specifically, a new preference 'domainfile' will be added, which is the
name of a file to be interpreted as your domain file.
the file contains on each line, a name for the domain and a list of files or
directories, if a directory is listed then all files underneath said directory
are considered part of that domain. an example would be
(what I would use for jhc)
utilities Util/
doc Doc/
boolean Boolean/
cmm Language/Cmm/
genutil GenUtil.hs
what this does is declare a set of mutally exclusive domains, everything in the
repo that is not listed is considererd a part of the unnamed 'main' domain.
the changes to the commands behavior would be:
darcs record will refuse to create patches that cross boundries between
domains. it would quit with an appropriate error message telling you to split
up the patch or perhaps interactivly not ask you about hunks which would cause
such a situation. ( '--force' could override this if you actually have local
changes you don't intend on propagating back into the subprojects and are aware
of the consequences of this)
darcs push, pull, record, whatsnew, and changes will have a --domain option,
which will
cause them to just consider patches that touch files in the given domain or
files in the given domain as appropriate. otherwise they behave identically.
darcs apply could optionally warn abount any patches that broke the domain
boundries in case someone sends you a patch from an older version of darcs that
isn't domain aware.
I think this would give us at least basic support for composing repositories
which should be sufficient for most projects. The main thing I like about it is
that it does not change the repository format at all, repos will be backwards
and forwards compatable so we can always extend the domain concept in the
future. I know it doesn't cover everything, but it would be a whole lot better
than the status quo and since it doesn't affect the repo format it can evolve
fairly independently as we decide we want new features.
let me know what y'all think. I could really really really use something like
this.
John
--
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users