[darcs-devel] Any answers for IsiSetup's concerns?
nicolas.pouillard at gmail.com
Thu Dec 20 14:20:18 UTC 2007
Excerpts from David Roundy's message of Thu Dec 20 14:13:32 +0100 2007:
> On Thu, Dec 20, 2007 at 02:04:42PM +0100, Nicolas Pouillard wrote:
> > Excerpts from David Roundy's message of Thu Dec 20 13:10:44 +0100 2007:
> > > On Thu, Dec 13, 2007 at 06:53:07PM +0000, Ian Lynagh wrote:
> > > > On Wed, Dec 12, 2007 at 12:14:15PM -0500, David Roundy wrote:
> > [...]
> > > Perhaps what we really need is someone to develop a simple posthook script
> > > to manage a permissions database. There are lots of nice programming
> > > languages in the world in which one could write a very short script that
> > > implemented all of this functionality *outside of darcs*. Darcs is good at
> > > managing files, such as simple text file databases, and I don't see the
> > > benefit is in putting all this complexity into darcs itself.
> > I think that having this database is not really easy, the format of this file
> > should be smart enough to don't get into conflicts problems when merging
> > different patches that have altered the database. And if it's not a file but
> > a directory, then you need as many files in this directory as files that have
> > a special permission. This later approach seems feasible but will involve a
> > lot of small files.
> I'm not sure why you'd have trouble with conflicting changes, if it's a
> text file. Just treat it like any other conflict, and make the user fix
> it. What's tricky about that? Or just run darcs revert on that file, and
> lose the conflicting changes. None of the proposed approaches that
> involved placing this database in darcs itself have suggested an approach
> that would allow user-friendly handling of conflicting permissions
> changes. Amazingly enough, putting code into darcs does not make that code
> better, and implementing ideas in darcs does not make those ideas any
> better either.
I don't mean conflicts on permissions on one file, in that case we want the
user take care of it. I talk about non conflicting changes like branching
then adding a permission to one file in one branch and another one on another
branch and then merge. Here you have to merge the database (the text of it)
and without some commutation properties on some parts of the database you
will get conflicts.
$ darcs init --repodir=R1
$ darcs get ./R1 ./R2
$ cd R1
$ darcs-permission add executable ./foo
$ cat .database
$ darcs record .database -lam 'p1'
$ cd ..
$ cd R2
$ darcs-permission add executable ./bar
$ darcs record .database -lam 'p2'
$ cat .database
$ darcs pull ../R1
... spurious conflicts on .database ...
I don't care that much on that feature, but I would say that's not necessary
simpler to do it outside of darcs. However I would prefer to have some
specific patches that would make this kind of database easier to do.
Nicolas Pouillard aka Ertai
More information about the darcs-devel