On 9/28/15, David Given <d...@cowlark.com> wrote: > Somehow I've ended up in this situation, where the parent of a commit > has a newer timestamp than the child: > > http://cowlark.com/cgi-bin/fossil.cgi/flooded-moon/timeline?f=905a301d7d28267ee35c41e9dd080d1ce7bcec1d > > Exporting this leads to the parent commit being emitted before the child > commit which it references, which causes git to crash out on import. > > Even worse, if I try to import the export file into a new Fossil > repository, it seems to work... except the repository is missing half > the files! Which suggests that Fossil *should* be crashing out, but isn't. > > I've tried modifying the timestamp of the relevant commit, but it > appears to have no effect. >
Perhaps this following change will help. Please try and let us know: --- src/export.c +++ src/export.c @@ -232,16 +232,17 @@ db_finalize(&q3); /* Output the commit records. */ db_prepare(&q, - "SELECT strftime('%%s',mtime), objid, coalesce(ecomment,comment)," + "SELECT strftime('%%s',coalesce(emtime,mtime)," + " objid, coalesce(ecomment,comment)," " coalesce(euser,user)," " (SELECT value FROM tagxref WHERE rid=objid AND tagid=%d)" " FROM event" " WHERE type='ci' AND NOT EXISTS (SELECT 1 FROM oldcommit WHERE objid=rid)" - " ORDER BY mtime ASC", + " ORDER BY coalesce(emtime,mtime) ASC", TAG_BRANCH ); db_prepare(&q2, "INSERT INTO oldcommit VALUES (:rid)"); while( db_step(&q)==SQLITE_ROW ){ Stmt q4; -- D. Richard Hipp d...@sqlite.org _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users