Sync SVN repo (svnsync) with encoding errors

Is it possible to fix / bypass non-UTF8 svn: log entries when synchronizing repositories with svnsync ?

Background

I am engaged in the maintenance of an open source module, which is stored in a large (over 10,000 revisions) subversion repository (1.5.5). I do not have administrator access to the remote repository to reset / filter / load the module. The old repository stops and I try to synchronize the source module in my local (1.6+) repository using svnsync. For instance:

 svnsync file://home/svn/temp-repo/ http://path.to.repo/modulename/ 

The problem is that the old repository did not use UTF8 encoding, and I find errors, for example:

 svnsync: Cannot accept 'svn:log' property because it is not encoded in UTF-8 

I cannot change the log property in the source repository, so I need to somehow change or ignore the value of the property when the encoding is unknown / invalid.

Any ideas?

For instance:

  • can pre-revprop-change script change the log property in the path?
  • I was told that git-svn can handle it, but using the git staging repository - how is this done?
  • Is it possible to ignore log properties or individual versions at all
+4
source share
3 answers

You will need to wait for the next version of Subversion, there is a pending patch to add support for encodings other than UTF8 to svnsync .

+2
source

You need to change pre-revprop-change.tmpl

 # cp pre-revprop-change.tmpl pre-revprop-change.tmp # vim pre-revprop-change.tmp exit 1 ==> exit 0 

Otherwise, you can use svnadmin setrevprop to modify repositories

+2
source

There is an easy solution for this. Modify the journal entry in the source repository using the following statements:

Example with revision 10281 and repository in / home / svn / repos

svn proplist -v --revprop -r 10281 file:///home/svn/repos | iconv --to-code UTF8//IGNORE -o /tmp/iconv.out

svn propset svn: log --revprop -r 10281 -F /tmp/iconv.out file: /// home / svn / repos

+1
source

Source: https://habr.com/ru/post/1335686/


All Articles