Sven Panne | 15 Mar 2007 12:00
Picon

Re: Hugs' build system

On Sunday 25 February 2007 18:12, Malcolm Wallace wrote:
> Ross Paterson <ross <at> soi.city.ac.uk> writes:
> > >    * I think that Hugs should finally be moved to darcs instead of CVS
> >
> > No objection, but I think it takes a bit of extra effort to make the
> > history look nice, e.g. check
> >
> > 	http://darcs.haskell.org/darcsweb/darcsweb.cgi?r=parsec;a=summary
>
> This is just a matter of which options you give to 'tailor', the
> conversion utility.  In particular, you can tell it to use the first
> line of the CVS commit message as the name of the darcs patch, with the
> remaining lines from CVS as the "long" message in darcs.

It would be very nice if you could do that conversion for the Hugs repository. 
I think that http://darcs.haskell.org/hugs98 will be the right place. The 
only thing is: Is "98" a good suffix when we will move to Haskell'? Hmmm... 
Anyway, having a darcs repository soon would be great.

> The main non-automated issue when converting is the need to create/steal
> a darcs-all script, and maybe a utility to fix executable permissions
> for fresh checkouts.

I can do this after the conversion. Furthermore, I think that we can (and 
should) have a unified version of these scripts for GHC, Hugs and nhc98.

Cheers,
   S.
Sven Panne | 15 Mar 2007 16:58
Picon

cvs commit: hugs98 hugs98.spec

panne       2007/03/15 08:58:01 PDT

  Modified files:
    .                    hugs98.spec 
  Log:
  Use update-alternatives for handling generic tool names

  Revision  Changes    Path
  1.50      +39 -12    hugs98/hugs98.spec
Sven Panne | 15 Mar 2007 17:49
Picon

cvs commit: hugs98 hugs98.spec

panne       2007/03/15 09:49:57 PDT

  Modified files:
    .                    hugs98.spec 
  Log:
  Re-added Summary field, which was deleted by accident

  Revision  Changes    Path
  1.51      +1 -0      hugs98/hugs98.spec
Malcolm Wallace | 15 Mar 2007 17:48
Picon

Re: Hugs' build system

Sven Panne <sven.panne <at> aedion.de> wrote:

> > This is just a matter of which options you give to 'tailor', the
> > conversion utility.
> 
> It would be very nice if you could do that conversion for the Hugs
> repository.

I have been trying all day today to persuade either tailor or cvs2darcs
to do the conversion, and failed miserably.  I believe there is some
kind of character-encoding problem causing tailor to misinterpret the
contents of the CVS repo, leading to only 16 patches of history, instead
of 2393.  Meanwhile cvs2darcs gives me a completely empty darcs repo
(after a very long time, and lots of warning messages).

Does the Hugs CVS repo contain any strange encoding in commit messages?
Neither ASCII nor UTF-8 seems to be accepted, whereas Latin-1 is
accepted but gives incorrect results.

Regards,
    Malcolm
Sven Panne | 15 Mar 2007 19:33
Picon

Re: Hugs' build system

On Thursday 15 March 2007 17:48, Malcolm Wallace wrote:
> I have been trying all day today to persuade either tailor or cvs2darcs
> to do the conversion, and failed miserably.  I believe there is some
> kind of character-encoding problem causing tailor to misinterpret the
> contents of the CVS repo, leading to only 16 patches of history, instead
> of 2393.  Meanwhile cvs2darcs gives me a completely empty darcs repo
> (after a very long time, and lots of warning messages).
>
> Does the Hugs CVS repo contain any strange encoding in commit messages?
> Neither ASCII nor UTF-8 seems to be accepted, whereas Latin-1 is
> accepted but gives incorrect results.

Do you have a log of what you did in detail? I don't have a black belt in 
using tailor or cvs2darcs, but perhaps I have some time in the next few days 
to play around a bit...

Cheers,
   S.
Sven Panne | 23 Mar 2007 16:28
Picon

Re: Hugs' build system

On Thursday 15 March 2007 17:48, Malcolm Wallace wrote:
> I have been trying all day today to persuade either tailor or cvs2darcs
> to do the conversion, and failed miserably.  I believe there is some
> kind of character-encoding problem causing tailor to misinterpret the
> contents of the CVS repo, leading to only 16 patches of history, instead
> of 2393.  Meanwhile cvs2darcs gives me a completely empty darcs repo
> (after a very long time, and lots of warning messages).

FYI: After patching tailor itself to make it run at all, I get 18 patches. :-( 
The patch was very trivial and has nothing to do with our problems, I guess:

--- /home/panne/tailor/vcpx/repository/darcs/__init__.py.~1~	2007-03-23 
14:19:01.000000000 +0100
+++ /home/panne/tailor/vcpx/repository/darcs/__init__.py	2007-03-23 
15:01:14.000000000 +0100
 <at>  <at>  -72,7 +72,7  <at>  <at> 
             ignored.append('^%s$' % re.escape(sfrelname+'.old'))
             ignored.append('^%s$' % re.escape(sfrelname+'.journal'))

-        boring = open(boringname, 'wU')
+        boring = open(boringname, 'w')
         boring.write('\n'.join(ignored))
         boring.write('\n')
         boring.close()
-----------------------------------------------------------------------------

> Does the Hugs CVS repo contain any strange encoding in commit messages?
> Neither ASCII nor UTF-8 seems to be accepted, whereas Latin-1 is
> accepted but gives incorrect results.

(Continue reading)

Sven Panne | 23 Mar 2007 17:03
Picon

Re: Hugs' build system

Further investigation show that the problematic commit is probably:

  date: 2006-08-10 19:31:47 +0200;  author: ross;  state: Exp;
  split off generation of the compatibility libraries into tools/make_oldlib

If I see this correctly, tools/make_oldlib was introduced then, and removed a 
few months later:

  date: 2006-11-24 14:12:16 +0100;  author: ross;  state: dead;  lines: +0 -0;
  remove unused script

I am not sure why this should be a problem, but playing around with tailor's 
start-revision strongly suggests this.

A bit clueless,
   S.
Malcolm Wallace | 23 Mar 2007 17:16
Picon

Re: Hugs' build system

Sven Panne <sven.panne <at> aedion.de> wrote:

> Further investigation show that the problematic commit is probably:
> 
>   date: 2006-08-10 19:31:47 +0200;  author: ross;  state: Exp;
>   split off generation of the compatibility libraries into
>   tools/make_oldlib
> 
> If I see this correctly, tools/make_oldlib was introduced then, and
> removed a  few months later:
> 
>   date: 2006-11-24 14:12:16 +0100;  author: ross;  state: dead; 
>   lines: +0 -0; remove unused script
> 
> I am not sure why this should be a problem, but playing around with
> tailor's  start-revision strongly suggests this.

Hmm, when I 'CVS update' to any date between those two commits, my repo
does not contain tools/make_oldlib!  Perhaps the CVS Attic has been
disturbed, such that the file no longer exists in any revision?  That
might certainly confuse tailor.

Regards,
    Malcolm
Sven Panne | 23 Mar 2007 17:29
Picon

Re: Hugs' build system

Hmmm, if I see things correctly, tailor has problems whenever it encouters a 
CVS file in "state: dead", i.e. when a file was removed in its past. If the 
CVS repo contains such a file, one gets only those changesets which are 
younger than that removal.

I've played around a bit with a local copy of the hugs98 repo, and whenever 
I've removed such file from the repo itself, tailor stopped at the next dead 
file, and so on, and so on...

Is there a trick I'm not aware of? Having dead (and perhaps resurrected) files 
in a CVS repo is not *that* uncommon. :-(

Cheers,
   S.
Sven Panne | 23 Mar 2007 18:21
Picon

Re: Hugs' build system

Short note: The bleeding edge version of tailor seems to be broken. I'm 
currently testing the latest released version (tailor-0.9.19), and it seems 
to work much better, at least it's working for some time now on the hugs98 
repo. But it's still in the last millenium, so I think it's time for 
dinner... :-)

Cheers,
   S.

Gmane