[darcs-users] domains: a proposal for composing repositories

Tomasz Zielonka tomasz.zielonka at gmail.com
Tue Jan 31 08:47:16 UTC 2006


On Tue, Jan 31, 2006 at 12:32:05AM -0800, John Meacham wrote:
> 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.

I like the idea and I have a small extension proposal...

> 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

For better flexibility we could make this a script that, given a
filename, would _compute_ the domain. It would be easy to achieve what you
proposed, with something like this (in shell script):

    case $PATH in
        Util/*) echo utilities;;
        Doc/*) echo doc;;
        ...
    esac

(of course, there could be a tool to make the typical case even easier).

But with a script you could do many interesting things, like returning
the directory name as the domain, or the directory name truncated to the
first two components, etc...

Best regards
Tomasz

-- 
I am searching for programmers who are good at least in
(Haskell || ML) && (Linux || FreeBSD || math)
for work in Warsaw, Poland




More information about the darcs-users mailing list