add a new file to a directory, follow these
steps.
You can also use the add command to
add a new directory.
Unlike most other commands, the add command is
not recursive. You have to expcicitly name files and directories that you wish
to add to the repository. However, each directory will need to be added
separately before you will be able to add new files to those directories.
$ mkdir -p
foo/bar $ cp
~/myfile foo/bar/myfile $ svn add
foo foo/bar $ svn add
foo/bar/myfile |
—B—
compare 2
files – svn diff -r 11:12 fileName | less
or svnd 12345
—D—
difference between files – svn diff -r 11:12 fileName | less
—E—
edited, which files are being edited in subversion – svn editors or ee
files affected for a revision - svn log -r 123 -v
files being edited in subversion, which – svn editors or ee
history – svn log asEditProject | less – this will lock everyone else out until you type ‘q’ to quit
old file, difference between old file
and new – see difference
between files
old version, revert to – svn cat -r123 filename > newfilename
remove a file, but remain able to retrieve old revisions:
status
or update
command. If you
remove the file without committing your changes, you will of course not be
able to retrieve the file as it was immediately before you deleted it.rm
.revert to a previous version, just
undo current uncommitted changes – svn unedit
revert to a previous version (checking
out, leaving subversion repository unchanged) - svn cat -r VERSION FILENAME
> FILE
so, for example, svn cat -r 1.280
frProjects > frProjects1-280
revert
to a previous version (actually changing the subversion repository back to a
previous version)
Might want to look at your changes first
joe@davinci~/httpd/cgi-bin/ws: svn diff -r 181:180 salesRepProjects | less
Then, if OK, make a patch
joe@davinci~/httpd/cgi-bin/ws: svn diff -r 181:180 salesRepProjects | patch
and you should get
patching file salesRepProjects
Do a subversion update
joe@davinci~/httpd/cgi-bin/ws: upd
M salesRepProjects
Might want to look at your changes one last time
joe@davinci~/httpd/cgi-bin/ws: svn diff salesRepProjects | less
Then, commit
joe@davinci~/httpd/cgi-bin/ws: svn commit -m 'Undo last change' salesRepProjects
/usr/local/svnroot/httpd/cgi-bin/ws/salesRepProjects,v <-- salesRepProjects
new revision: 1.82; previous revision: 1.81
revision, which files were part of -
svn log -r 123 -v
—S—
undoing
changes (revert to a previous version) - svn update -p -r VERSION FILENAME >
FILE
so, for example, svn update -p -r
1.280 frProjects > frProjects1-280
—V—
version – svn status filename
which files
are being edited in subversion – svn editors or ee
which files were part of a revision
- svn log -r 123 -v
—X—