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

Re: Forcing commit of unmodified file

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-06-13 20:19:52 CEST

On Jun 13, 2007, at 09:37, Arnauld Van Muysewinkel wrote:

>>> On another hand, I still don't understand why SVN is preventing
>>> this...
>>
>> Because there's really no good reason for incrementing the global
>> revision number if nothing changed?
>
> Well, there are times where one wants to differentiate two revision
> number, even though the content has not changed.

There really aren't, though: the revision number means exactly "the
number of changes that have occurred in the repository." No
additional meaning should be assigned to the revision number. If no
change has occurred, then there's no reason to increment the revision
number.

> And also because there are times where one wants to commit to have the
> occasion to add a new revision comment.

As you've been shown, Subversion supports that through

svn propedit --revprop -r 123 svn:log url://to/repository

The feature is disabled by default because, as I think you've
noticed, the old value of the revision property is lost. But that
just means this is an opportunity for you to write a pre-revprop-
change hook that better meets your needs, by preserves the property
in some way, for example.

Like, there are scripts you can call which will send an email to a
person or a mailing list every time a revision property changes. That
way you have a record of all the changes in your email.

Someone else suggested you can just log to a file, or implement a
script that specifically disallows changing the existing log and only
allows appending to it. I personally wouldn't like that last option,
since the main reason I go and change log messages is to correct
typos, not to add info. But the decision is left to the repo admin.

The example pre-revprop-change hook provided with Subversion only
lets the author of the commit make the change, which is a good
precaution. You could extend this in other ways -- for example,
letting someone change the property only if the commit was made
within the past -- I don't know -- 3 days, maybe. And after that
point, disallow all revision property changes.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 13 20:20:49 2007

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.