[darcs-users] suggestion: each push should identify its target repo internally

David Roundy droundy at abridgegame.org
Sun Aug 10 14:55:53 UTC 2003


On Fri, Aug 08, 2003 at 03:47:15PM -0700, Zack Brown wrote:
> On Fri, Aug 08, 2003 at 02:46:30PM -0700, John Meacham wrote:
> > On Fri, Aug 08, 2003 at 11:34:24AM -0700, Zack Brown wrote:
> > > It seems like darcs uses the email address of a push to identify
> > > which repo is the intended recipient. This seems a bit heavy. Maybe a
> > > more user-oriented (as opposed to root-oriented) interface would be
> > > for the push to contain a reference to the target repository within
> > > itself. That way, regardless of which email address receives the
> > > push, it can be sent to the proper repo without a problem.  I think
> > > that would really simplify the pushability situation. One person
> > > could have tons of repositories, but manage everything from a single
> > > user account.
> > 
> > Yeah, I wanted this same thing since I use procmail to do all my mail
> > sorting from a single account. A workaround is to look in the 'Context'
> > section for patch names, these should be enough to figure out the
> > repository assuming you don't have multiple branches of the same
> > project with substantially similar patch sets. You might want to see a
> > previous post I made to the list describing how to use darcs_patcher
> > without creating an account.
> 
> http://www.abridgegame.org/pipermail/darcs-users/2003/000271.html
> 
> In that mail, you said
> > if none of the above work, a .procmail entry to redirect darcs patches
> > should work anywhere.
> 
> Probably a procmail solution would be best, because it's very generic. I
> suspect the 'user+darcs at domain.com' thing doesn't work for many systems
> (I use exim personally), but procmail is virtually universal.

I would definitely like to get darcs-patcher working nicely with procmail.
I don't recall if I mentioned it on the mailing list, but darcs-patcher now
accepts a directory as an argument.  It still assumes the repo resides in a
directory named "repo" within that directory, and the allowed_keys must
also reside in that directory.

In the long run, probably we'd like darcs-patcher (as John suggested a
while back) to accept simply the repo directory and the allowed_keys
filename as arguments, which will make it flexible enough to be used in any
number of ways (e.g. via procmail, or its own user, or with John's
username+repo trick).

> I think a simple way to do it would be to just add a clear email header
> to each push, indicating the precise repository. That way the procmail
> recipe can be simple, and the recipient can have multiple branches of
> the same project with similar patch sets.
> 
> Since we're only talking about adding an email header, there's no chance
> it could break compatibility.

Yeah, that would be the way to do it.  We could either use the subject, or
add a special header (e.g. DarcsRepository: helloworld).  I could go either
way.  Subject is a bit appealling, as it would make the push emails a bit
easier to identify in a mailbox, but perhaps we'd like to set up the
subject based on the names of the patches pushed, and have a separate field
for the repo identity.

> BTW, is there a sample 'push' email anywhere?

You can easily create one yourself by setting up a couple of repositories
and setting _darcs/prefs/email to your own email address in one of them and
then pushing to that repository.  Or you could just use the -t or --cc
option of push to send it to yourself.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list