Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
Bo Berglund writes: > 2) Use hotcopy to make a backup copy of everything including hooks. > The caveat here is that the hotcopy needs to be using the exact same > version on both master and mirror. But I have 1.9.7 master on Windows > and 1.9.3 mirror on Ubuntu Linux No, hotcopy needs compatible versions. Any version of Subversion is compatible with all older versions, and any 1.N.x is compatible with any other 1.N.y. In your case 1.9.7 and 1.9.3 are compatible. -- Philip
Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
Philip Martin writes: > Bo Berglund writes: > >> 2) Use hotcopy to make a backup copy of everything including hooks. >> The caveat here is that the hotcopy needs to be using the exact same >> version on both master and mirror. But I have 1.9.7 master on Windows >> and 1.9.3 mirror on Ubuntu Linux > > No, hotcopy needs compatible versions. Any version of Subversion is > compatible with all older versions, and any 1.N.x is compatible with any > other 1.N.y. In your case 1.9.7 and 1.9.3 are compatible. It's a bit more complicated in practice. Any version of Subversion can read/write all the older repository formats and it is the repository format that needs to be compatible. So for the hotcopy to be useable on the mirror what matters is whether the version of Subversion on the mirror is compatible with the repository format on the master. -- Philip
Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
On Thu, 29 Mar 2018 10:34:52 +0100, Philip Martin wrote: >Philip Martin writes: > >> Bo Berglund writes: >> >>> 2) Use hotcopy to make a backup copy of everything including hooks. >>> The caveat here is that the hotcopy needs to be using the exact same >>> version on both master and mirror. But I have 1.9.7 master on Windows >>> and 1.9.3 mirror on Ubuntu Linux >> >> No, hotcopy needs compatible versions. Any version of Subversion is >> compatible with all older versions, and any 1.N.x is compatible with any >> other 1.N.y. In your case 1.9.7 and 1.9.3 are compatible. > >It's a bit more complicated in practice. Any version of Subversion can >read/write all the older repository formats and it is the repository >format that needs to be compatible. So for the hotcopy to be useable on >the mirror what matters is whether the version of Subversion on the >mirror is compatible with the repository format on the master. OK, but I have now created the dump files and transferred them to the mirror server. On that I had prepared all of the repos for synchronization and succeeded to do the initial sync on two of them when I ran into the problem for the 3rd and 4th, which triggered this last question round here. Now I am in a situation that I could load the dump files for the repos I have not tried to sync yet, thus I can use the --allow-non-empty flag during initialization and get the sync started on a later revision. But I have two questions in this regard: 1) Do I have to disable the hooks I put in place for sync during the load? Or will they not be triggered during a load operation? 2) What do I do about the two repos where I have already run an initialization command without the flag and where a number of revisions have already been transferred before the error? If I erase these repos and recreate them empty can I repeat the initialization command with the non-empty flag and it will work? Or is the fact that the initialization has been already executed without the flag on these two master repos place them in limbo? Can an svnsync initialize command be undone? I don't want to rename the mirror repo to something different... -- Bo Berglund Developer in Sweden
Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
Bo Berglund writes: > 1) Do I have to disable the hooks I put in place for sync during the > load? Or will they not be triggered during a load operation? No, by default load does not invoke hooks. You can choose to invoke them via a command line options. > 2) What do I do about the two repos where I have already run an > initialization command without the flag and where a number of > revisions have already been transferred before the error? If you want to load a dumpfile into these repositories then you need an incremental dumpfile that starts at the correct revision, not at zero. So to update a mirror where head is rN you need: svnadmin dump --incremental -rN+1:head master > If I erase these repos and recreate them empty can I repeat the > initialization command with the non-empty flag and it will work? Or is > the fact that the initialization has been already executed without the > flag on these two master repos place them in limbo? > Can an svnsync initialize command be undone? The master knows nothing about the mirror (except for any custom stuff that you put into the master hook files). All the svnsync initialization data is stored as revprops on r0 of the mirror. e.g: $ svnlook proplist --verbose --revprop -r0 ../mirror/apache-repo-fsfs svn:date 2011-08-04T21:40:25.140661Z svn:sync-from-url https://svn.apache.org/repos/asf/subversion svn:sync-from-uuid 13f79535-47bb-0310-9956-ffa450edef68 svn:sync-last-merged-rev 1827963 You can modify/delete this data using propset/propdel commands. -- Philip
Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
On Thu, 29 Mar 2018 13:20:04 +0100, Philip Martin wrote: >Bo Berglund writes: > >> 1) Do I have to disable the hooks I put in place for sync during the >> load? Or will they not be triggered during a load operation? > >No, by default load does not invoke hooks. You can choose to invoke >them via a command line options. Good, then I will go ahead and erase the failed mirror repos and re-create them and then load the dump files. But for the not yet used repos I can just start loading the dumps. Saves some time. >> 2) What do I do about the two repos where I have already run an >> initialization command without the flag and where a number of >> revisions have already been transferred before the error? > >If you want to load a dumpfile into these repositories then you need an >incremental dumpfile that starts at the correct revision, not at zero. >So to update a mirror where head is rN you need: I don't need to continue from where they failed, it is easier for these two to just load the full dump into a newly created empty repo. >The master knows nothing about the mirror (except for any custom stuff >that you put into the master hook files). All the svnsync >initialization data is stored as revprops on r0 of the mirror. e.g: That is the important item I needed! It means that if I kill the existing partial mirror repos and re-create them anew I will have a working target after I load the dump! :) Thank you very much for your help! Much appreciated! -- Bo Berglund Developer in Sweden
Re: Subversion 1.9.7 server on Windows, advice on setting up svnsync?
Bo Berglund writes: > Good, then I will go ahead and erase the failed mirror repos and > re-create them and then load the dump files. But for the not yet used > repos I can just start loading the dumps. Saves some time. There are some things you can do to make load faster. In 1.10 load has a new --no-flush-to-disk option since a mirror typically doesn't need the fsync() guarantees. On Linux you can use the eatmydata LD_PRELOAD library to achieve as similar thing for releases before 1.10. You may also find that increasing the memory cache speeds up loading: eatmydata svnadmin load -M256 some-repo < some-dumpfile -- Philip
Re: Is svnadmin load affected by hooks?
Hi Bo, On Wed, Mar 28, 2018 at 8:17 PM, Bo Berglund wrote: > When I load a dump into an empty repo, will the operation be affected > by the hooks I have already set up for svnsync? > If you're dumping into an empty repository, that typically resets the repository UUID to match that of the dump file. Changing the UUID will break the sync. > I have created dumpfiles for all 9 repos I want to sync, and now I am > about to load these into the repos I had prepared for sync when I > discovered that network problems interfered. > svnadmin load takes the options "--use-pre-commit-hook" and "--use-post-commit-hook". Assuming you're using your post-commit hook to trigger the calls to sync, you could pass that flag. That seems weird to me, though, in that such an approach would trigger a sync request per loaded commit. Eric.
Subversion crashes during local checkout
Hi folks, Subversion crashes here while trying to check out locally via file:// with an apparently invalid URL. All commands are run in PowerShell on PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> [System.Environment]::OSVersion.Version Major Minor Build Revision - - - 10 0 16299 0 First tried: PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn --version svn, version 1.9.7 (r1800392) compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows from TortoiseSVN 1.9.7 PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> svn co file://D:\Entwicklung\svn-repos\scm-sv n-test-at-sign . svn: E235000: In file 'D:\Development\SVN\Releases\TortoiseSVN-1.9.7\ext\subversion\subversion\libsvn_client\checkout.c' line 87: assertion failed (svn_uri_is_canonical(url, scratch_pool)) Then tried MaxSVN: PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv n.exe --version svn, version 1.10.0-alpha3 (Alpha 3) compiled Aug 22 2017, 08:13:12 on x86_64-microsoft-windows10.0.14393 PS D:\Entwicklung\Projekte\scm-svn-test-at-sign> D:\Entwicklung\Programme\svn-1.10.0-alpha3\sv n.exe co file://D:\Entwicklung\svn-repos\scm-svn-test-at-sign . svn: E235000: In file '..\..\..\subversion\libsvn_client\checkout.c' line 88: assertion failed (svn_uri_is_canonical(url, scratch_pool)) I know that the URL should start with file:///, but I would expect something like "invalid URL". The assert failed isn't really helpful to the user. Ideas? Michael
Re: Is svnadmin load affected by hooks?
On Thu, 29 Mar 2018 10:23:34 -0700, Eric Johnson wrote: >On Wed, Mar 28, 2018 at 8:17 PM, Bo Berglund wrote: > >If you're dumping into an empty repository, that typically resets the >repository UUID to match that of the dump file. Changing the UUID will >break the sync. Gosh, that was unfortunate! I have just completed the local load operation for all repos. If the UUID will block the subsequent synchronize (which I have not come to yet but is next on my list), then this is also all in vain... But to be on the other side if I can use svnadmin setuid to I get a fresh uuid on all of them, maybe that will make it work for sync after all? >> I have created dumpfiles for all 9 repos I want to sync, and now I am >> about to load these into the repos I had prepared for sync when I >> discovered that network problems interfered. >> > >svnadmin load takes the options "--use-pre-commit-hook" and >"--use-post-commit-hook". Assuming you're using your post-commit hook to >trigger the calls to sync, you could pass that flag. That seems weird to >me, though, in that such an approach would trigger a sync request per >loaded commit. I was just worried about the hooks interfering with the load operation. I have no need for them at all in that situation, but they will be used during synchronize. And I used no extra arguments to the load command. -- Bo Berglund Developer in Sweden
Re: Is svnadmin load affected by hooks?
Hi Bo, On Thu, Mar 29, 2018 at 2:29 PM, Bo Berglund wrote: > On Thu, 29 Mar 2018 10:23:34 -0700, Eric Johnson > wrote: > >On Wed, Mar 28, 2018 at 8:17 PM, Bo Berglund > wrote: > > > >If you're dumping into an empty repository, that typically resets the > >repository UUID to match that of the dump file. Changing the UUID will > >break the sync. > > Gosh, that was unfortunate! I have just completed the local load > operation for all repos. If the UUID will block the subsequent > synchronize (which I have not come to yet but is next on my list), > then this is also all in vain... > > But to be on the other side if I can use > svnadmin setuid > to I get a fresh uuid on all of them, maybe that will make it work for > sync after all? > Yes. Eric.