How can I find the root folder of a given subversion working copy

后端 未结 8 865
暗喜
暗喜 2020-12-09 15:44

Quite often I\'m sitting in the middle of a subversion working copy, and I want to do a quick svn status to find out what changes I have made since the last che

8条回答
  •  星月不相逢
    2020-12-09 16:20

    On Windows:

    svn info . |findstr /C:"Working Copy Root Path:"
    

    On Linux:

    svn info . |grep -F "Working Copy Root Path:"
    

    It can be assigned to a variable using a little string manipulation. Windows version:

    FOR /F "delims=" %%i IN ('svn info . ^|findstr /C:"Working Copy Root Path:"') DO SET SOME_TEMP_VAR=%%i
    SET WORKING_COPY_ROOT=%SOME_TEMP_VAR:~24%
    

提交回复
热议问题