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

bahrep
  • 29,961
  • 12
  • 103
  • 150
Rakesh Bhagat
  • 397
  • 2
  • 5
  • 22

4 Answers4

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.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Rakesh Bhagat
  • 397
  • 2
  • 5
  • 22
  • 5
    If you only want to allow updating log messages https://mattrefghi.com/blog/solutions/subversion/subversion-repository-has-not-been-enabled-to-accept-revision-propchanges/ 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. – Paul B. Jun 07 '18 at 08:41
  • Step 7. I found that there is no need to enter `exit 0`. Just click Ok. – Hans Vonn Jun 07 '18 at 12:51
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.

bahrep
  • 29,961
  • 12
  • 103
  • 150
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.

Mister Rose
  • 117
  • 3
  • 11
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.