You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jeff Kowalczyk <jt...@yahoo.com> on 2006/03/18 23:32:23 UTC

apply specific timestamp when comitting?

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

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.)

Thanks. 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: apply specific timestamp when comitting?

Posted by Ryan Schmidt <su...@ryandesign.com>.
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