On Thu, 9 Jan 2025 15:20:46 +0100, Johan Corveleyn <jcor...@gmail.com> wrote:

>On Thu, Jan 9, 2025 at 1:26?PM Daniel Sahlberg
><daniel.l.sahlb...@gmail.com> wrote:
>...
>> The only solution that will make sure you actually have a working sync
>> is to monitor that the sync script completes without errors. Maybe you
>> could have a script that looks for the svn:sync-lock property (something
>> like svn proplist -v --revprop -r0 http://remote.server.tld/svn/repo)
>> at a time when the sync SHOULD have completed?
>
>Or perhaps try to run some daily / weekly "verification" script that
>runs "svnlook youngest %PATH_TO_REPO%" or "svnadmin info
>%PATH_TO_REPO%" on both sides and compares the results (or simply
>mails them to you as a first step). Adding an "svnadmin verify" and an
>"svnadmin pack" might be useful too.

Well based on these ideas I guess I could run a checking script on a linux
server on the company LAN (with access to the main svn server) like this:
---------------------------------------------------------------
#!/bin/bash
MAIN=$(svn info  https://agiengineering/svn/hw | grep Revision:)
MIRROR=$(svn info https://svn.boberglund.com/svn/hw | grep Revision:)

#!/bin/bash
MAIN=$(svn info https://mainserver/svn/hw | grep Revision:)
MIRR=$(svn info https://svn.mirrorserver.com/svn/hw | grep Revision:)
if [ "$MAIN" != "$MIRR"  ]; then  #Different revisions, sync failed
#So call website script which will send alert message.

eval "curl -m 10 --data \"main=$MAIN"\  --data \"mirror=$MIRROR\"
https://www.mydomain.com/php/svnsyncerror.php";
---------------------------------------------------------------

And the php script would then send a message to me about the diff between the
repos.

OUCH!

When testing this script (without the curl call) on the only Linux server I have
on the same LAN as the main svn Windows server I got into a problem since svn
keeps asking for the password all the time!
After entering the password it works as expected but it asks again the next time
I test!

I thought that svn would cache a successful password so it does not have to be
entered again. That is how it works on both the main server (windows) and the
mirror server.

But it is not working on the Ubuntu server on the main LAN.
What can I do in order for the script to run without asking for my password?
Svn version on the linux server is:  1.14.1

I have not used svn on that machine previously as far as I can remember...
It is used as an OpenVPN server.
And it is a *server* without any desktop. The only way to work on it is via an
SSH terminal (like PuTTY).

I have enabled the following line in $HOME/.subversion/servers:

[global]
store-passwords = yes

Any ideas?

(I don't know how to craft a Windows bat file to do the checking above so that
is why I turned to the Linux server...)


-- 
Bo Berglund
Developer in Sweden

Reply via email to