Tortoise SVN hidden _svn folders

后端 未结 9 1128
半阙折子戏
半阙折子戏 2021-02-05 15:51

They are specially annoying when I need to upload to the server a web solution.

Is there a way of configuring SVN to create the _svn folders outside my working directory

相关标签:
9条回答
  • 2021-02-05 16:19

    +1 for the solution from Isak Savo.

    And you can do an XCOPY and exclude "/svn" folders :

    XCOPY %1 %1_deploy /EXCLUDE:C:\ExcludeSVN.txt /E /C /I /F /R /Y

    Content of ExcludeSVN.txt :

    /_svn

    In fact, if you want to upoload to a web server, your exclude file can contains a lot more :

    • .pdb
    • .cs
    • .resx
    • .csproj
    • .sln
    • .webinfo
    • .bak
    • .sql
    • .zip
    • .vspscc
    • .vssscc
    • .scc
    • \Web.config

    Warning : If you exclude .cs files, you gave to re-copy .css file after

    0 讨论(0)
  • 2021-02-05 16:19

    The really dirty way in Windows: Create a copy of your project, open Explorer, navigate to the directory the copy is in, and do a Find for everything ending with _svn. Once the search is done, select all and hit Delete.

    Yuck! But it works really well.

    0 讨论(0)
  • 2021-02-05 16:20

    if you use a nant script to enable deployment to the web server it has a _SVN and _SVN/** as automatic excludes when copying files. nant will filter out lots of unwaanted files when copying files via its copy task including:

    • **/*~
    • **/#*#
    • **/.#*
    • **/%*%
    • **/CVS
    • /CVS/
    • **/.cvsignore
    • **/.svn
    • /.svn/
    • **/_svn
    • /_svn/
    • **/SCCS
    • /SCCS/
    • **/vssver.scc
    • /_vti_cnf/

    you can read more about NANT at its project home page here : NANT Home

    0 讨论(0)
  • 2021-02-05 16:24

    It's not (currently) possible to configure SVN (or TortoiseSVN) to create the .svn (or _svn) directories outside the working copy. I believe that the SVN 1.6 roadmap includes revisiting the working-copy library. The ability to put the administrative directories somewhere else might come out of this work, but I'm speculating.

    You should use the "svn export" command to create a "clean" copy of your working copy (i.e. without the _svn directories). This works from the command line client.

    If you're using TortoiseSVN, you can right-click on the working copy, and choose "Export...". This will ask you for a folder to export the files to. Alternatively, you can right-drag a working copy to a folder (one that's not a working copy), and TortoiseSVN will bring up a context menu; among the options are "SVN Export to here" and "SVN Export all to here", the latter also exporting files not under version control.

    0 讨论(0)
  • 2021-02-05 16:25

    Robocopy deployment...

    robocopy {source} {dest} /MIR /XD _svn /XD .svn
    
    0 讨论(0)
  • 2021-02-05 16:29

    Use "svn export" to create a clean directory tree.

    0 讨论(0)
提交回复
热议问题