commit 82899209c92f784931177dcbf8b7225ba4de6a4e parent dcd455e9addc3185cf6e73974eeb1d5346986cd6 Author: dankert <devnull@localhost> Date: Fri, 26 Mar 2010 23:54:00 +0100 Skript: Setzen der mtime aller Source-Dateien auf das Commit-Datum (so wie SVN es von alleine tut). Diffstat:
doc/examples/maintenance/hg-set-mtime.sh | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/doc/examples/maintenance/hg-set-mtime.sh b/doc/examples/maintenance/hg-set-mtime.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ ! -d .hg ]; then + echo no .hg directory found. Is this a mercurial controlled directory? + exit 4 +fi + +for sf in `find -type f -not -path "./.hg*"`; do + d=`hg log $sf -l1 --template '{date|isodate}'` + echo setze Datum $d für Datei $sf + touch $sf -d "$d" +done