Created
March 2, 2009 18:14
-
-
Save meleyal/72893 to your computer and use it in GitHub Desktop.
SVN recipes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# limit the log to the last 4 commits | |
svn log --limit 4 | |
# show the log for a particular file | |
svn log foo.js | |
# create a new repo | |
svn import http://repo/path/<new-repo> -m "Initial import" | |
# create a new branch | |
svn copy http://repo/path/trunk http://repo/path/branches/<new-branch> -m "Create new branch" | |
# revert to a previous version | |
svn merge -r 303:302 http://repo/path/ | |
# restore a deleted file | |
svn copy -r 303 http://repo/path/foo.js ./foo.js | |
# revert local changes to a file (no network required) | |
svn revert foo.js | |
# remove deleted files | |
svn status | grep '\!' | awk '{print $2;}' | xargs svn rm | |
# add all new files | |
svn add * --force | |
# recursively remove .svn directories | |
rm -rf `find . -type d -name .svn` | |
# remove Mac OS resource fork files | |
svn rm --force dir/._* | |
# edit externals | |
svn propedit svn:externals . | |
# edit ignore | |
svn propedit svn:ignore . | |
# find files that are not under version control | |
svn status | grep "^\?" | awk "{print \$2}" | |
# Roll back everything to a previous revision | |
svn merge -r HEAD:302 http://repo/path/ | |
# get an old revision of a changed / deleted file | |
svn merge -r <302>:<303> foo.js | |
# merge changes from another branch | |
# 303 = include everything *after* this revision from the *other* branch | |
svn merge -r 303:HEAD http://repo/path/ | |
# delete branch | |
svn delete http://repo/path/branches/<branch> -m "Remove old branch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are trying to delete the non-versioned files from SVN branch. This command works on Client node --- for /f "tokens=2" %i in ('svn status ^| find "?"') do del %i* Need help to frame a chef cookbook to execute this command automatically on the client node
note - Client node - Windows 2016 and Chef Workstation and Server - Linux (redhat 7.3) Basically trying to revert the non versioned files in SVN branch (checkOut folder) and our TortoiseSVN client version is 1.7