Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
...
Most of the arguments used for these example commands are completely bogus and, depending on the command, should be replaced by valid paths to files in your working copy or the remote repository.
Checkout a Structure Nodefrom SVN
You can checkout structure nodes as directories on your local file system.
...
No Format |
---|
svn ls svn://repo/some/path/ |
You can use the diff command to show changes between the repository and your working copy.
No Format |
---|
svn diff | less |
This will display the changes in diff format between working copy files and the repository.
You can also specify a file or dir
No Format |
---|
svn diff some/file/or/dir |
You should periodically update your working copy from the repository to keep it up to date.
...
These changes will be pushed to the remote repository when you execute a commit command
Info | ||
---|---|---|
| ||
Don't use svn add without providing arguments as you may inadvertently add files to your commit which should not be in there. Also be careful using directories as by default SVN will add unknown files unless they are excluded (e.g. in user's Subversion config file) |
This command can be used to delete files.
...
The deletion will occur when you commit.
When you execute the rm command, Subversion will not by default leave a local copy of the file and so will delete it immediately!
This command is used to commit your local changes to the repository, including deletions, changes and additions.
...
This page shows the full syntax for the merge command.
Creating a development branch is done using the copy command to copy the current version of the trunk into a branches folder.
No Format |
---|
svn cp -m "Creating development branch." ^/projects/java/trunk ^/projects/java/branches/my-dev-branch |
This command can also be used to make copies of files.
No Format |
---|
svn cp -m "Copying my file." myfile.java myfile_v2.java |
Or to copy a file into a folder.
No Format |
---|
svn cp -m "Copying my file." myfile.java some/dir |
When copying a file into a folder, the folder must already exist in the repository (or have been added using the add command).
Tagging is also actually performed by using the copy command.
...
Typically, tags are not created by hand but through an automated build/release system.
Tags are only by convention in SVN as the directories are typically not made read-only. If you are checking out and modifying something with tags in its path, you're probably doing it wrong.
You can replace a copy of a file in your working file copy with the repository's current version using a command like this.
...
You can also recursively revert entire directories and their sub-directories should you really want to revert a lot of changes.
No Format |
---|
svn revert -R path/to/some/dir |
You will want to be careful with this, as you can easily lose your work if it is has not been committed yet and gets reverted!
...