SVN checkout filtered by file extension?

后端 未结 6 1161
故里飘歌
故里飘歌 2020-12-09 10:35

I have a home-grown automated build script in the form of a DOS batch file. In part of that script, I check out (with \"svn checkout\") a section of our SVN repository that

6条回答
  •  余生分开走
    2020-12-09 11:02

    This is possible: you can svn checkout an empty directory, and then svn update filename for each file that you do want.

    Your script can do something like:

    1. svn checkout svn://path/to/repos/directory --depth empty
    2. svn list --recursive svn://path/to/repos/directory
    3. Pipe that result through a filter that removes the forbidden file extensions, e.g. grep
    4. Iterate over this new filtered list and svn update --parents each file

    That would give your desired result of a working copy without certain files or file extensions.

    Of course, there is also the issue that you mention of “people [checking] in lots of fluff” but that’s a separate matter.

提交回复
热议问题