[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: saving time stamps of files with subversion 1.1.1

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-11-04 15:32:19 CET

Ph. Marek wrote:
>>Certainly I think the ability to save and restore a file's mtime is useful.
>>I'm not sure if a normal file property is the right place to store the time
>>- it seems very odd to have a property that the user can modify but
>>Subversion will always overwrite any value that the user puts in it.
>
> I believe that is just a matter of documentation

Maybe.

> - after all, it's immensely
> useful to do a
> svn ps svn:text-time "2004-01-01T02:03:04.000000Z" <URL>
> and have the file the correct time someone updates ....

I don't understand.

>>One question (I haven't tested this patch to try to find the answer): when
>>you modify the property during a commit, do you also modify the text-base
>>version of that property and the working version of it?
>
> Well, it better should be done locally too - that's why there is a
> SVN_ERR (svn_wc_prop_set (SVN_PROP_TEXT_TIME,
> propval, path, adm_access, pool) );
> in the patch.

So that sets the working property, and I suppose the base property gets updated
automatically during the commit. That's OK.

>>Please write a log message, in the style described in the HACKING file.
>>
>>I'm sorry I don't have time to review the code functionally at the moment,
>>but I am interested so I will try to do so soon.
>
> Thank you very much!
> Of course if there's someone of the core developers interested I'll likely put
> more effort into this, eg. write a log message :-)

Well, I'm interested, and I'm a developer with commit access; not one of the
most active ones who you would call the "core", but I could commit your patch.

> As long as I'm the only user it seemed not worth the time - especially because
> a log message has to include the function names, and I don't know an
> automated way to generate that (haven't read HACKING yet, though)

It is worth the time, because people will find it easier to review your patch
if they can read the log message first, and therefore people will be more
likely to review your patch and take an interest.

To get the function names automatically, try my attached script "svnlogmsg",
which generates a log message template, including the file names and function
names, with a diff below, ready for you to fill in the details.

- Julian

#!/bin/bash
# Write a log message template, listing the files that would be committed.
FILES=`svn st "$@" | grep "^[^?]" | sed 's/^.......//' | sort`
echo
for FILE in $FILES; do
  echo "* $FILE"
  # Find the names of the functions affected, and list them in parentheses.
  svn diff --diff-cmd diff -x -up $FILE | sed -e "s/^@@ [^@]* @@ .*\<\([A-Za-z_][A-Za-z0-9_]*\) *(.*/ (\1): /" -e "t" -e "d" | uniq
done
echo
# (when in sorted order) svn diff -x -up "$@"
for FILE in $FILES; do
  svn diff --diff-cmd diff -x -up $FILE
done

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 4 15:33:19 2004

This is an archived mail posted to the Subversion Dev mailing list.