Appeal to respect the development history and time tracking

Arne Babenhauserheide arne_bab at web.de
Tue Aug 25 15:18:23 UTC 2015


Am Dienstag, 25. August 2015, 07:26:45 schrieb Adrian Klaver:
> > At least add warning that all the date and time stamps of all files and
> > all directories would be destroyed _forever_ after using Mercurial SCM.
> 
> What are you talking about?
> 
> Or better yet, can you provide a coherent example?

Even though I disagree with Mosc (especially on the apes thing), I can
provide an example:

I use deft-mode[1] to organize my writings. It shows and filters text
files in a directory. For each file it shows the title (first line)
and the data, and it sorts by date.

This weekend I had partial failure of the data on my system USB stick,
including that folder. Some files were lost, so I recloned the deft
directory -- and all files had the same date, so the ordering was wrong.

I recovered very easily, though:

hg up null
for i in {1..12}; do hg up ${i}00; done
hg up tip

(I have ~1200 revisions in there)

With that I had rising mtimes again.

If I had wanted to spend more time, I could have updated to every
revisions, but I did not need exact ordering. Being mostly right was
OK :) (and USK sticks are horribly slow)

If I had needed the exact time, I’d have used touch:

for i in {1..1200}; do
  for j in $(hg log -r $i --template "{files}"); do
    touch --date "$(hg log -r tip --template "{date|isodate}")" $j;
  done
done

… except for filenames with spaces …

(does someone have a solution for these?)

Best wishes,
Arne

[1]: http://jblevins.org/projects/deft/
--
Ein Würfel System - einfach saubere Regeln: 

- http://1w6.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 299 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150825/0b8bcf81/attachment.asc>


More information about the Mercurial mailing list