Subversion moving files
If you try to commit your changes, Subversion will see the old filename as missing and the new one as an unversioned file. You could just check the new filename to get it added in, but you would then lose the history tracing, as Subversion does not know the files are related.
A better way is to notify Subversion that this change is actually a rename, and you can do this within the Commit and Check for Modifications dialogs.
Usually you set your ignore list such that all generated files are ignored in Subversion. But what if you want to clear all those ignored items to produce a clean build?
Usually you would set that in your makefile, but if you are debugging the makefile, or changing the build system it is useful to have a way of clearing the decks. You have to hold the Shift while right clicking on a folder in the explorer list pane right pane in order to see this in the extended context menu.
This will produce a dialog which lists all unversioned files anywhere in your working copy. You can then select or deselect items to be removed. When such items are deleted, the recycle bin is used, so if you make a mistake here and delete a file that should have been versioned, you can still recover it. Deleting, Moving and Renaming Prev Chapter 4. Daily Use Guide Next. Deleting, Moving and Renaming. The svn move command to issue is:. After moving the directory you'll then want to commit the change.
You can either do this now, or some time later, but assuming you want to do it now, you can commit the move with this svn commit command:. To make our SVN directory move example a little harder, let's assume that you want to move foo up one level in the directory tree.
Just issue these commands instead:. As a final note, if you want to move files with SVN, just use the same command syntax as shown here.
In addition, you can only move files within a single repository—Subversion does not support cross-repository moving. Subversion supports the following types of moves within a single repository:. Move a file in the repository this is an immediate commit, so it requires a commit message :. You are reading Version Control with Subversion for Subversion 1.
Fitzpatrick, and C.
0コメント