Appeal to respect the development history and time tracking
Cameron Simpson
cs at zip.com.au
Thu Aug 27 02:00:49 UTC 2015
On 25Aug2015 17:18, Arne Babenhauserheide <arne_bab at web.de> wrote:
>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.
[...]
>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?)
I wrote (and use regularly) this script:
https://bitbucket.org/cameron_simpson/css/src/tip/bin/hg-apply-manifest-dates
which applies the commit dates from a chosen revision (default "tip") to an
existing tree of files. My normal use case is to put meaningful timestamps on
an hg archive before tarring/zipping it up, but it should serve your use case
also.
Since it is Python and uses os.utime, it doesn't care whether files have speces
in them.
I am indebted to Dirkjan Ochtman for the core program logic.
Cheers,
Cameron Simpson <cs at zip.com.au>
More information about the Mercurial
mailing list