subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Honeylyn O. Fukuoka" <honey...@menue.com>
Subject Re: SVNSYNC Error
Date Wed, 01 Aug 2012 05:28:20 GMT
Hi,

I created a .bat file with the following scripts but still didn't work:

1. REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$USER" = "svnsync" ]; then exit 0; fi
echo "Only the svnsync user can change revprops" >&2
exit 1
exit 0

2. REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
if [ "$USER" = "svnsync" ]; then exit 0; fi
echo "Only the svnsync user can change revprops" >&2
exit0

3. exit 0
Did I do something wrong?


Thanks,


Honey
On Wed, Aug 1, 2012 at 12:41 PM, vishwajeet singh <dextrous85@gmail.com>wrote:

> On Wed, Aug 1, 2012 at 10:09 AM, Honeylyn O. Fukuoka <honeylyn@menue.com>
> wrote:
> > Okay, I will try this..
> > Correct me if I'm wrog, from this:
> >
> > echo "Changing revision properties other than svn:log is prohibited" >&2
> > exit 1
> > To this:
> > echo "Changing revision properties other than svn:log is prohibited" >&2
> > exit 0
>
> Just keep
> exit 0
> remove everything else.
>
> >
> >
> >
> > Thanks,
> >
> > Honey
> >
> > On Wed, Aug 1, 2012 at 12:36 PM, vishwajeet singh <dextrous85@gmail.com>
> > wrote:
> >>
> >> On Wed, Aug 1, 2012 at 10:00 AM, Honeylyn O. Fukuoka <
> honeylyn@menue.com>
> >> wrote:
> >> > 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
> >>
> >> Just add one line 'exit 0' to your pre-rev-prop hook and try
> >>
> >> if that works than you can make further changes only if required,
> >> above may not work in your environment as I am not sure if you have
> >> svnsync user in your environment
> >>
> >> > Thanks a lot,
> >> >
> >> >
> >> > Honey
> >> > On Wed, Aug 1, 2012 at 12:19 PM, vishwajeet singh <
> dextrous85@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Wed, Aug 1, 2012 at 9:48 AM, vishwajeet singh <
> dextrous85@gmail.com>
> >> >> wrote:
> >> >> > On Wed, Aug 1, 2012 at 9:43 AM, Honeylyn O. Fukuoka
> >> >> > <honeylyn@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@gmail.com>
> >> >> >> wrote:
> >> >> >>>
> >> >> >>> On Wed, Aug 1, 2012 at 9:28 AM, Honeylyn O. Fukuoka
> >> >> >>> <honeylyn@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.
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> 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
>



-- 
*HONEYLYN O. FUKUOKA*
System Administrator
Menue Philippines, Inc.
*
*

Mime
View raw message