Chris's Wiki :: blog/programming/DVCSWant Commentshttps://utcc.utoronto.ca/~cks/space/blog/programming/DVCSWant?atomcommentsDWiki2008-07-08T07:06:38ZRecent comments in Chris's Wiki :: blog/programming/DVCSWant.By nothings on /blog/programming/DVCSWanttag:CSpace:blog/programming/DVCSWant:e39c994ab4e0a2ac071c4d5ddbcb01928554425enothings<div class="wikitext"><p>Hmm, good point. I guess they just store the check-in time, you're right. (Yeah, that was me before.)</p>
</div>2008-07-08T07:06:38ZBy Chris Siebenmann on /blog/programming/DVCSWanttag:CSpace:blog/programming/DVCSWant:d73151102194c30ac100750a2105be21ce7ae563Chris Siebenmann<div class="wikitext"><p>Unfortunately, I suspect that DVCSes simply don't save the original file
timestamp in their data about the file.</p>
</div>2008-07-08T04:14:45ZFrom 70.231.151.21 on /blog/programming/DVCSWanttag:CSpace:blog/programming/DVCSWant:7ef0574c77df23a0acdb415cfd3ed0b7de997317From 70.231.151.21<div class="wikitext"><p>I would think it would be a lot easier to just hack the source of an existing VCS to do it, rather than try to maintain a secondary database, since I imagine it's a pretty localized change--hopefully there's only one place in the source code that's actually creating the client copy. The only tricky part would be digging out the timestamp from the existing data.</p>
</div>2008-07-07T18:51:49ZFrom 83.8.206.62 on /blog/programming/DVCSWanttag:CSpace:blog/programming/DVCSWant:0a199fafca0491ac657b675e491cf66aa27c701cFrom 83.8.206.62<div class="wikitext"><p>Almost all DVCS allow to specify action after commit or after/before checkout using hooks. You can use hooks to save timestamps to a flat file when committing changes, and restore it from the file after checkout. </p>
<p>If you are using Git you can take a look at <a href="http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#head-4ac8692162665280f4413d639231d2cc3bff0898">Metastore</a> (<a href="http://david.hardeman.nu/software.php#metastore">http://david.hardeman.nu/software.php#metastore</a>): I guess that similar examples exists for other DVCS like Marcurial, Bazaar or Darcs.</p>
<p>-- <br>
<em>Jakub Narebski</em></p>
</div>2008-07-07T16:01:03ZFrom 71.35.109.122 on /blog/programming/DVCSWanttag:CSpace:blog/programming/DVCSWant:1c984b282eceb2a3c44e0208f0c5acc4efcb5266From 71.35.109.122<div class="wikitext"><p>I'm not sure whether merge conflicts will be a major issue, but Darcs and many of the others have hooks that let you specify external (or internal to the source tree) programs to be run pre- and post-commit. Among other things this is sometimes used to do things like run autoconf before automatically creating a distribution tarball. From the <a href="http://darcs.net/manual/node7.html#SECTION007113000000000000000">manual</a>:</p>
<pre>
darcs setpref predist "autoconf && automake"
darcs dist --dist-name darcs-`./darcs --version`
</pre>
<p>More pertinently you could easily create a predist script to specify modification times and permissions (the latter and symbolic links being the only things I really miss with Darcs).</p>
<p>- Kate</p>
</div>2008-07-07T04:24:30Z