Created
January 28, 2014 10:03
-
-
Save kenguest/8665000 to your computer and use it in GitHub Desktop.
Script to change modification date of file in mercurial to last mod date according to mercurial. Useful for when you do a checkout and want a ls -lart to reflect when files were last changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $* | |
do | |
date=`hg log -l 1 $i --template '{date|isodate}\n'` | |
if [ "$date" != "" ] ; then | |
touch -m --date="$date" $i | |
else | |
echo "$i not in hg" > /dev/stderr | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated in https://github.com/kenguest/hg-tools