[darcs-users] darcs 1.0.4pre2: diff with wrong file times

Matthias Andree matthias.andree at gmx.de
Tue Aug 2 03:05:09 UTC 2005


David Roundy <droundy at darcs.net> writes:

> That would be pretty easy, but also not terribly informative.  A more
> "correct" date would be chosen according to when that particular file was
> actually modified.  But that would also be an expensive date to
> determine.

That is unreliable - you'd only use the time of the "record" operation.

> Hmmm. It may be that we could make patch application always set mtimes to
> the patch time, but that would give incorrect times when applying inverse
> patches (which is how we generate the trees for the diffs).
>
> There's also the interesting question of how to convert dates into
> mtimes... I know it's done by ls et al, but I've never done it myself.

On the C layer, it's just a UNIX timestamp, with mktime, gmtime,
localtime and such. Not sure how that maps to (1) Haskell and (2)
DARCS's data structures.
 
> I suppose we could try to parse the output and strip the dates, but that
> seems like a risky operation (what if diff gives some unexpected output?)
> with very little benefit.

That's something cut or sed should be able to do. No need to hack such
into DARCS.

-- 
Matthias Andree




More information about the darcs-users mailing list