LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 07-12-2007, 07:29 AM   #1
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Rep: Reputation: 16
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 05:00 AM.
 
Old 07-12-2007, 08:55 AM   #2
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
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.
 
Old 07-12-2007, 09:31 AM   #3
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Original Poster
Rep: Reputation: 16
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
 
Old 07-13-2007, 08:38 PM   #4
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
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'.
 
Old 07-15-2007, 01:39 PM   #5
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Original Poster
Rep: Reputation: 16
it already is - any other ideas?
 
Old 07-17-2007, 05:04 AM   #6
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Original Poster
Rep: Reputation: 16
Smile

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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
anon svn read-only over apache: '.svn/entries': No such file hedpe Linux - Software 2 04-29-2009 05:31 AM
forced removal of a package n8flieg Ubuntu 2 02-20-2007 07:05 PM
forced to log in to failsafe k61824 Linux - Software 1 01-19-2007 10:57 AM
SVN Help Crobat Linux - Software 1 07-18-2006 04:56 PM
check forced ? jamaso Linux - General 4 04-09-2002 06:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration