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

Re: apply specific timestamp when comitting?

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-03-19 16:29:25 CET

On Mar 19, 2006, at 00:32, Jeff Kowalczyk wrote:

> Is there an option to svn commit, or a svn propset idiom that
> allows me to
> apply a specific timestamp to a changeset?

There is no option when committing, but provided you have enabled the
changing of revision properties, you can do it with a propset:

svn propset svn:date --revprop -r $REV '2006-03-19T15:11:55.842601Z'
$REPO

where $REV is the number of the revision whose date you want to
change and $REPO is the URL to your repository.

See the file hooks/pre-revprop-change.tmpl in your repository
directory for an example of how to write an appropriate pre-revprop-
change hook.

At least, that *should* work. I'm current getting the error "svn:
'pre-revprop-change' hook failed with error output:" and then no
further output, though I've added a pre-revprop-change hook which
allows everything. If you get that error too we'll have to dig further.

> If there is no direct way and a propset method can be/is used to
> apply a
> timestap to a changeset post-commit, is that a revisionless change?
> (i.e.
> does the propset increment the revision number, or can it be done
> for a
> historical revision, too.)

It is a change of a revision property (a non-versioned property) so
the repository revision number does not increase. Yes, you can change
properties of historical revisions too. It's up to you to write your
pre-revprop-change hook such that you allow only those kinds of
changes you want to allow. A best practice is also to either log such
changes or to send out an email to your team about such changes,
since they are unversioned properties so once you set it to a new
value, the old one is irretrievably lost forever.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 19 16:30:23 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.