Here's what I did.
I don't really know how to do it so what I did I searched then found this
one.
Basically copy the code below into a text file and name it
pre-revprop-change.bat and save it in the \hooks subdirectory for your
repository.
@ECHO OFF
:: Set all parameters. Even though most are not used, in case you want to
add
:: changes that allow, for example, editing of the author or addition of
log messages.
set repository=%1
set revision=%2
set userName=%3
set propertyName=%4
set action=%5
:: Only allow the log message to be changed, but not author, etc.
if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME
:: Only allow modification of a log message, not addition or deletion.
if /I not "%action%" == "M" goto ERROR_ACTION
:: Make sure that the new svn:log message is not empty.
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do (
set bIsEmpty=false
)
if "%bIsEmpty%" == "true" goto ERROR_EMPTY
goto :eof
:ERROR_EMPTY
echo Empty svn:log messages are not allowed. >&2
goto ERROR_EXIT
:ERROR_PROPNAME
echo Only changes to svn:log messages are allowed. >&2
goto ERROR_EXIT
:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2
goto ERROR_EXIT
:ERROR_EXIT
exit /b 1
Thanks for the link, I will try to follow the instructions there.
Do I have to just copy this:
#!/bin/sh
USER="$3"
if [ "$USER" = "svnsync" ]; then exit 0; fi
echo "Only the svnsync user can change revprops" >&2
exit 1
Thanks a lot,
Honey
On Wed, Aug 1, 2012 at 12:19 PM, vishwajeet singh <dextrous85_at_gmail.com>wrote:
> On Wed, Aug 1, 2012 at 9:48 AM, vishwajeet singh <dextrous85_at_gmail.com>
> wrote:
> > On Wed, Aug 1, 2012 at 9:43 AM, Honeylyn O. Fukuoka <honeylyn_at_menue.com>
> wrote:
> >> Hi,
> >>
> >>
> >> Thanks for the past response.
> >> Can you tell me what changes do I have to make in the prerevprop-change
> >> hook?
> >> I tried some but nothing happened.
> >
> > What did you try ?
> >
> > It just need to be there and should be executable nothing else
> >
> > $ echo "#!/bin/sh" > hooks/pre-revprop-change
> > $ chmod 755 hooks/pre-revprop-change
> >
> You can find more details here
> http://svn.apache.org/repos/asf/subversion/trunk/notes/svnsync.txt
> >>
> >>
> >>
> >> Thanks,
> >>
> >> Honey
> >>
> >> On Wed, Aug 1, 2012 at 12:05 PM, vishwajeet singh <dextrous85_at_gmail.com
> >
> >> wrote:
> >>>
> >>> On Wed, Aug 1, 2012 at 9:28 AM, Honeylyn O. Fukuoka <
> honeylyn_at_menue.com>
> >>> wrote:
> >>> > Hi,
> >>> >
> >>> >
> >>> >
> >>> > I have to sync our repository to another server, so to test it, I
> >>> > created a
> >>> > test repository in my local and tried to do svnsync command to
> >>> > sync/mirror
> >>> > it.
> >>> >
> >>> > Here's what I did:
> >>> >
> >>> >
> >>> >
> >>> > 1. Go to the folder where the repositories are located
> >>> >
> >>> > 2. in the cmd typed: svnsync initialize (URL of the Repository to
> >>> > Mirror)
> >>> > (URL of the Destination of the Mirrored Repo)
> >>> >
> >>> > sample: svnsync initialize svn://loocalhost/Repo
> Name
> >>> > svn://localhost/Destination Repo Name
> >>> >
> >>> >
> >>> >
> >>> > ERROR:
> >>> >
> >>> > svnsync: E16506: Repository has not been eabled to accept revision
> >>> > propchanges; ask the administrator to create a pre-revprop-change
> hook.
> >>>
> >>> As error says you need to enable 'pre-revprop-change hook' in
> >>> destination repository.
> >>>
> >>> >
> >>> >
> >>> >
> >>> > I am using Subvrsion Sever 1.7.5
> >>> >
> >>> >
> >>> >
> >>> > Question:
> >>> >
> >>> > 1. Am I on the right path in creating the Mirror Repository?
> >>> >
> >>> > 2. How do I create a pre-revprop-change hook? I tried some hooks
> that I
> >>> > saw
> >>> > in the search engine but didn't work.
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > Please help me on this.
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > Thanks so much,
> >>> >
> >>> > --
> >>> > HONEYLYN O. FUKUOKA
> >>> >
> >>> > System Administrator
> >>> > Menue Philippines, Inc.
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Vishwajeet Singh
> >>> +91-9657702154 | dextrous85@gmail.com | http://bootstraptoday.com
> >>> Twitter: http://twitter.com/vishwajeets | LinkedIn:
> >>> http://www.linkedin.com/in/singhvishwajeet
> >>
> >>
> >>
> >>
> >> --
> >> HONEYLYN O. FUKUOKA
> >> System Administrator
> >> Menue Philippines, Inc.
> >>
> >>
> >
> >
> >
> > --
> > Vishwajeet Singh
> > +91-9657702154 | dextrous85@gmail.com | http://bootstraptoday.com
> > Twitter: http://twitter.com/vishwajeets | LinkedIn:
> > http://www.linkedin.com/in/singhvishwajeet
>
>
>
> --
> Vishwajeet Singh
> +91-9657702154 | dextrous85@gmail.com | http://bootstraptoday.com
> Twitter: http://twitter.com/vishwajeets | LinkedIn:
> http://www.linkedin.com/in/singhvishwajeet
>
--
*HONEYLYN O. FUKUOKA*
System Administrator
Menue Philippines, Inc.
*
*
Received on 2012-08-01 06:31:22 CEST