A utility for cleaning a SVN checkout by removing files that are not part of the repository.
The current project page is located here: https://github.com/blb2/svn-clean.
CMake is used to build this project. There are plenty of ways of using CMake, so choose the way that you prefer to work best.
Newer versions of Visual Studio support opening CMake-based projects through its
"Open Local Folder" functionality. This is probably the easiest way of working
with this project. The CMakePresets.json
file is provided to give a baseline
set of configurations that are similar to working with regular Visual Studio
projects. Of course, these presets do not need to be used.
You can also use CMake on the command-line to generate Visual Studio projects. See the following section on how to generate these files.
If cmake
is not in your system's PATH
, then feel free to add it temporarily
with one of the following commands:
-
Command Prompt:
PATH=%PROGRAMFILES%\CMake\bin;%PATH%
-
PowerShell:
$Env:PATH += ";$Env:PROGRAMFILES\CMake\bin"
-
Git Bash:
PATH=$(cygpath -u "$PROGRAMFILES")/CMake/bin:$PATH
The following configuration presets are available, along with build presets under them:
windows-msvc-x86
: Sets up CMake to use the "Visual Studio 17 2022" generator for producing a 32-bit build.windows-msvc-x86-dbg
: Builds theDebug
configuration.windows-msvc-x86-rel
: Builds theRelease
configuration.
windows-msvc-x64
: Sets up CMake to use the "Visual Studio 17 2022" generator for producing a 64-bit build.windows-msvc-x64-dbg
: Builds theDebug
configuration.windows-msvc-x64-rel
: Builds theRelease
configuration.
The following is an example of building a 64-bit release build:
cmake --preset windows-msvc-x64
cmake --build --preset windows-msvc-x64-rel
# Build artifacts are now under build/windows-msvc-x64.
-
Ways of configuring with CMake:
# Simple initialization: cmake -B build # Allow the build process to be verbose: cmake -B build -D CMAKE_VERBOSE_MAKEFILE=ON # If you're on a native, 64-bit platform, but you wish to produce a # 32-bit build: cmake -B build -A Win32 # If using CMake 3.27 or greater, and building on Windows with Visual # Studio, it is preferable to specify the version of the Windows SDK: cmake -B build -A version=10.0
-
Ways of building with CMake:
# Simple building; default configuration varies: cmake --build build # Build with a specific configuration: cmake --build build --config Debug cmake --build build --config Release cmake --build build --config RelWithDebInfo cmake --build build --config MinSizeRel # If a solution or workspace was generated by CMake, open it in the IDE: cmake --open build
This application can take directory paths as arguments. If no path is given, then the current directory is used.
svn-clean svn-project1 svn-project2
On Windows, the shell is used to delete files. Unfortunately, this means the list of files being deleted will not be printed out. However, the delete process is actually just placing the files into the Recycle Bin. On Linux or macOS, the list of directories and files are printed out as they're deleted.
If you'd like to see a test run, or dry run, of what the command would do
without actually doing it, you can use the -n
option:
svn-clean -n
/home/user/project/Makefile~
/home/user/project/README~
To revert as well as remove unversioned files, one can specify the -r
option:
svn-clean -r
svn-clean
is licensed under version 3 of the GPL or later. See LICENSE.txt for more info.