How to export changed files between two SVN revisions

前端 未结 6 1043
旧时难觅i
旧时难觅i 2021-02-09 00:57

How can I export changed files in SVN that have changed between two revisions. I need a solution either via command line or by using any scripts (with proper folder structure).

6条回答
  •  一整个雨季
    2021-02-09 01:36

    I created a batch file that will work to export the files changed between revisions.

    @echo off
    
    FOR /F "tokens=1,2" %%I IN ('svn diff --summarize -r %1') DO (
        IF NOT %%I == D (
            IF NOT EXIST %2\%%J\.. mkdir %2\%%J\..
    
            svn export --depth empty -q --force %%J %2\%%J
            echo %2\%%J
        )
    )
    

    To use it you just specify the revision or revision range on the command line and a destination for exported files.

    C:\YourRepository>svnexport.bat 1:10 C:\Export
    

提交回复
热议问题