Repository has not been enabled to accept revision propchanges; ask the administrator to create a pre-revprop-change hook
Asked Answered
C

4

10

HI I am trying to mirroring my repository with another server/machine repository

I have two different machine(window) at two different server.at one machine I have already a SVN repository(source repository) and I want to mirror this repository with another repository(destination repository) at another machine.So I have created one empty repository(destination repository) at another machine.But when I want to initialize destination repository with source repository.I am getting mentino error. NOTE: I have already created pre-revprop-change.bat file in hook folder. pre-revprop-change.bat file has only one line of code that is exit 0

Caviness answered 29/5, 2017 at 10:37 Comment(0)
C
17
  1. Open your Visual SVN Server

  2. Right click on repository for which you want to create pre-revprop-change hook

  3. Click on properties on window will come

  4. Now click on Hooks tab

  5. At end you will see pre-revision properties change hook option click it.

  6. Click on edit option.

  7. One text area will come type here exit 0

  8. Click on OK.

That's it.

Caviness answered 1/6, 2017 at 12:9 Comment(2)
If you only want to allow updating log messages mattrefghi.com/blog/solutions/subversion/… gives the right commands for step 7 (instead of exit 0). I know that's not what the questions asks for but what brought me to this SO page.Conciliate
Step 7. I found that there is no need to enter exit 0. Just click Ok.Himalayas
R
0

When you need to mirror you Subversion repositories, consider the VisualSVN Distributed File System (VDFS). It is much easier to deploy and maintain than using the replication based on svnsync. Moreover, it is at least ten times faster than svnsync.

Ridge answered 27/3, 2020 at 14:12 Comment(0)
V
0

I am trying to replicate a SVN repo using SVN sync, onto a Windows computer, using a python script that calls the svn command line functions.

When I run the following command in CMD.EXE, I get the error

svnsync init file:///c:/path/to/reponame https://remote.server/svn/reponame svnsync: E165006: Repository has not been enabled to accept revision propchanges;

I have the exit 0 in c:/path/to/reponame/hooks/pre-revprop-change. I used CR and CRLF and got the same result.

I tried to go to the link in the comments above, and it appears to be a dead page.

If I run this command in WSL (Windows Subsystem for Linux) it works fine ( with '#!/bin/sh\nexit 0\n' in the pre-revprop-change file)

I am assuming this is due to differences in the Windows and linux versions of the svn command line utilities.

As usual, the Windows versions are hobbled.

Vue answered 20/10, 2022 at 12:50 Comment(1)
Actually, you just need to give the filename an extension: pre-revprop-change.bat or .cmd.Unloosen
S
0

In your repo folder go into the hooks folder. You may have templates there (my templates were Linux shell scripts, but my repo is on windows). On Linux you can probably just copy the template to a .sh file. On Windows, create a pre-revprop-change.bat

   ::SET REPOS="%1"
   ::SET REV="%2"
   ::SET USER="%3"
   ::SET PROPNAME="%4"
   ::SET ACTION="%5"
   
   if "%5" EQU "M" (
   if "%4" EQU "svn:log" (
   :: return "success"
   exit 0
   ))
   
   :: NOTE: write to &2, which is STDERR
   echo "Changing revision properties other than svn:log is prohibited" >&2
   
   :: return "error"
   exit 1

In my case it took affect right away without a service restart.

Scaremonger answered 6/4, 2023 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.