[darcs-users] a patch and a bug

David Roundy droundy at abridgegame.org
Thu Jul 31 10:53:07 UTC 2003


On Wed, Jul 30, 2003 at 05:16:43PM -0700, John Meacham wrote:
> yeah, I am working on a proper patch for sending MIME email, I wrote the
> code before for another haskell project involving email bounce messages
> and can reuse it almost exactly.

That sounds great!  :) I'm looking forward to the next patch.  As you might
have guessed from the quality of my email-related code, it isn't my
favorite part of the code on which to work, although it's obviously very
important (especially the darcs-patcher--which will often be the receiving
end of a darcs push).

> This patch was mainly a stopgap measure to keep things like half a quoted
> principle conversion happening to the patch in transit (which would be
> bad-bad) and to have them appear in peoples mailers in a somewhat
> prettier format.
>
> Yeah, the character set of the patch data itself can't very well be
> defined, as a single patch may contain text from several different files
> with different encodings and perhaps even binary data. But since the
> patch mime type is given as a text/*, many mailers may try to interpret
> it as text, so I specified the charset that the patch meta info is
> written in. (by which I mean everything except the added lines
> themselves)

Ah.  I had no idea that mailers would do such things! Now that part of the
patch makes a lot more sense.

> > > also, darcs push keeps on claiming i have no recorded patches to push,
> > > despite my creation of this patch.  (hence me sending this patch
> > > directly to the list) Pull works just fine to pull patches from the
> > > darcs repository.. I am not quite sure what I am doing wrong.
> > 
> > This troubles me... it sounds like a bug in get_common_and_uncommon, which
> > is a very important function, but also sufficently complicated that it may
> > very well have a bug.  If so I definitely want to find that bug!
> > 
> > Just to first check in case you did indeed make a mistake, did you try
> > giving darcs push a repository argument?  i.e.
> > 
> > darcs push http://abridgegame.org/darcs
> > 
> > If not, give that a try.  darcs push (or pull) with no arguments works with
> > the last pushed or pulled repository, so if you had two repositories of
> > your own (one for experimenting, one for interfacing to ag.o), you might
> > very well have pulled locally and then accidentally pushed locally to the
> > repo you just pulled the patch from.
> > 
> > If this wasn't the problem, could you perhaps make a tarball of your
> > repository available to me, so I could try to figure out what went wrong?
> > Or if you could put it up on an http server, that would work.  Because my
> > only guess as to where the bug might be lurking (since push has worked
> > consistently for me) is that it could be triggered by an unusual layout of
> > intentory and inventories/.
> 
> hmm.. okay, it appears the problem was that the last repo was set to '.'
> for some reason. my _darcs/prefs/lastrepo had '.' and _darcs/prefs/repos
> had both '.' and 'http://abridgegame.org/darcs'. curious.

Indeed.  I have very little idea how '.' got there.  I just added a patch
which makes darcs get not set the lastrepo when getting from a relative
directory, but I'm not sure how one would get . there, unless you ran a
"darcs pull ."

I've also made it so both pull and push now will report what repo they are
pulling from or pushing to, if you pull or push from the "lastrepo".

> It would be nice if push gave a nice summary of what it did, even with
> the -v option it is not very chatty, basically a message saying
> sent:
> patch1
> patch2
> patch3
> to 'foo+darcs at wheretherepois.com' from 'john at foo.net' unsigned.
> my previous patch added the last line, since it was non-trivial to
> figure out where darcs push was sending my patches when i had no
> _darcs/prefs/email set. it just succeeded without any messages.

Actually, _darcs/prefs/email determines the email of *incoming* pushes, not
outgoing pushes.  But yes, your patch to report where it's going is a good
thing.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list