svn commit missing file automatically -
i want write batch file can auto commit missing file recursively. how write batch command? please helps.
the following batch script should svn delete , commit files marked missing (i.e. deleted locally not using svn delete):
@echo off svn status | findstr /r "^!" > missing.list /f "tokens=2 delims= " %%a in (missing.list) ( svn delete %%a && svn -q commit %%a --message "deleting missing files")
missing files shown svn status
character !
, example:
! test.txt
this script uses findstr filter out modifications other missing files. list of missing files written file, missing.list
.
next, iterate through file, using tokens=2 delims=
remove !
lines in file, leaving (hopefully) filename. once have filename, pass svn delete
, svn commit
. feel free change contents of message.
please note have not tested script. in particular, don't know happens if 1 of files wish commit has space in path, or happens if encounter conflict part of way through. may better replace svn delete
, svn commit
echo svn delete
, echo svn commit
, can see script before let loose on repository.
Comments
Post a Comment