In the process of setting up a backup 'script' for my SVN directories ( ON THE SERVER - not my local working directories) via svnadmin using a GUI or DND to add to the backup list I would like to check, as a safety feature, that each of the selected directories is in fact a proper SVN directory.
I have looked at my existing directory structure and find it has the following sub-directories: conf, db, hooks, locks as well as the files format & README.txt
All SVN repos & directories are presently created/handled by the current version 1.7.10 of TortoiseSVN.
Any ideas or comments on how checking for this specific structure is a good way to accept only SVN directories and reject all others?
TIA
Just came across this same problem. The commands svnlook info and svnlook youngest (and probably others as well) give an exit code of 0 or 1 depending on whether the supplied directory is a subversion repository or not. This applies to SVN repos and not 'working copy' of them as user999713 claims. So the following bash script shows 0 when directory is a SVN repo and 1 if not.
svnlook info directory > /dev/null 2>&1
echo $?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With