Subversion post-commit on windows
http://wwvv.codersrevolution.com/blog/Creating-a-postcommit-hook-for-Subversion
General rantings about .NET, Linux, Biztalk and the odd hardware fun
Subversion post-commit on windows
http://wwvv.codersrevolution.com/blog/Creating-a-postcommit-hook-for-Subversion
Using “SlikSvn” (and most other svn clients), you can relatively easily check the state of your locally checked out copy on a Windows pc.
Add this to a .CMD file in Windows. In the output it will list objects that needs to be handled – most likely:
CheckSVNState.CMD ——————————- @ECHO OFF SET DT=%DATE: =0% SET TT=%TIME: =0% SET OUTFILE=EDI_Local_Svn_%DT:~-4%%DT:~3,2%%DT:~0,2%.txt C:\bin\SlikSvn\bin\svn status S:\SVNLocal | FIND /V “? ” > c:\temp\%OUTFILE% ——————————-
You can also check for objects that should have been added to Subversion, but have been missed:
CheckSVNMissingAdd.CMD ——————————- @ECHO OFF REM REM Find all files in a given local working-copy that are NOT under version-control REM C:\bin\SlikSvn\bin\svn status S:\SVNLocal | find “? ” | find /v “\bin” | find /v “\obj” | find /v “.vs” | find /v “btproj.user” | find /v “csproj.user” | find /v “\UpgradeLog” | find /v “.btp.cs” | find /v “.xsd.cs” | find /v “.btm.cs” | more ——————————-
The files excluded by the various FIND commands needs to be adapted to the type of files you work with. The command above was create for Biztalk development.
Inspired by SO
You may want to get the latest version of a file in a subversion repository, but NOT checking the file out (which will then create the .svn directory, enabling you to later on updating and committing changes)
To get the latest version of a Subversion file – enabling you to update and commit afterwards:
svn checkout URL PATH
To only get the latest version of a Subversion file – NO updates and commits possible (a so-called unversioned tree):
svn export URL PATH