Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-12-2007, 08:29 AM
|
#1
|
Member
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74
Rep:
|
svn: Value will not be set unless forced (solved)
I'm trying to retrospectively change the author property of certain revisions in my subversion repository.
I run:
Code:
svn propedit -r 185 --revprop svn:author
...which gives me the svn:author property to edit in vim, when I save and close this I get
Code:
svn: Value will not be set unless forced
Does anyone know how to force this?
Last edited by senyahnoj; 07-17-2007 at 06:00 AM.
|
|
|
07-12-2007, 09:55 AM
|
#2
|
Member
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79
Rep:
|
If you don't already know about them, each svn command has a help page. For 'propedit', use 'svn help propedit'.
As you'll see there, you can force operations using '--force'.
Usually if something needs to be forced with svn you should make sure you're doing things the 'right way'. These properties are not revision controlled the way everything else in the repository is. Once you've changed it, the old settings are lost.
|
|
|
07-12-2007, 10:31 AM
|
#3
|
Member
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74
Original Poster
Rep:
|
Thanks, for some reason I totally missed seeing that on svn help propedit - either going blind or stupid..
Now I get:
Code:
$ svn propedit --force -r 185 --revprop svn:author
svn: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existent
svn: At least one property change failed; repository is unchanged
The pre-revprop-change hook script on the server is
Code:
#!/bin/sh
# contents of /home/svn/hooks/pre-revprop-change
# owned and executable by apache
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:author" ]; then exit 0; fi
echo "Changing revision properties other than svn:log and svn:author are prohibited" >&2
exit 1
|
|
|
07-13-2007, 09:38 PM
|
#4
|
Member
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79
Rep:
|
You also have to make sure the script is actually executable. By default, the hook scripts are NOT executable. Just do a 'chmod 755 pre-revprop-change'.
|
|
|
07-15-2007, 02:39 PM
|
#5
|
Member
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74
Original Poster
Rep:
|
it already is - any other ideas?
|
|
|
07-17-2007, 06:04 AM
|
#6
|
Member
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74
Original Poster
Rep:
|
solved! - post-revprop-change was looking for a perl script it didn't have: propchange-email.pl
located this on the filesystem, copied it to my hook scripts directory and edited post-revprop-change to
Code:
/home/svn/hooks/propchange-email.pl "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org
|
|
|
All times are GMT -5. The time now is 09:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|