How to programatically do file versioning with SVN and .NET?

后端 未结 4 1948
无人共我
无人共我 2021-02-06 05:59

We have a report generator. Daily, it writes its data into a excel file.

For reasons of version controlling and file data safety, we need to alter this file, and commit

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 06:29

    We are using tool that actually searching for installed TortoiseSVN in predefined locations and using it command-line api. If that is for Windows and it's for not redistribution - it might be easier to do.

    Helpful code for cmd:

    @echo off
    if exist "%ProgramW6432%\TortoiseSVN\bin\TortoiseProc.exe" set patht=%ProgramW6432%
    if exist "%ProgramFiles%\TortoiseSVN\bin\TortoiseProc.exe" set patht=%ProgramFiles%
    if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\TortoiseProc.exe" set patht=%ProgramFiles(x86)%
    
    echo Placing SVN Commit
    "%patht%\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /path:"%CD%" /notempfile    
    

    If you still want to do that task from code - SharpSVN http://sharpsvn.open.collab.net is better choiсe

提交回复
热议问题