Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
...
relative path - the relative path to a file or directory in the working copy (as opposed to a full URL)
repository root - the base URL of the repository such as svn://svn.freehep.org/hps/
head revision - the most recent global revision of the repository
^ - The "^" character can be used to specify the repository root for any command that accepts a Subversion URL.
...
In both cases, you will need to commit in order for these changes to be pushed to the repository.
Merge Merging Changes
Warning | ||
---|---|---|
| ||
Merging is a complex, an advanced command. Always use '--dry-run' to check the results of a command merge before actually executing it. |
Merging can be done in different ways, and a complete summary is beyond the scope of this tutorial.involves combining changes from one version of the repository with another.
Two different types of merges will be covered here, though this is far from covering all the ways in which this command can be used.
Merge When working on a branch into the trunk:
svn merge ^/projects/foo/branches/v01-02-03/ ^/projects/foo/trunk
This is an advanced command so don't use it unless you know what you're doing.
Same command which just prints what would happen:
svn merge ^/projects/foo/branches/v01-02-03/ ^/projects/foo/trunk
After a merge, the changes are made to the local copy and must still be committed, using the usual commit command.
You can also use merge to undo commits (or series of commits).
, you will periodically want to merge from trunk to your branch.
No Format |
---|
cd my-hps-java-branch; svn merge ^/java/trunk |
Similarly, you eventually will want to merge back into trunk from the branch once you are done with it.
No Format |
---|
cd hps-java-trunk; svn merge ^/java/branches/my-hps-java-branch |
Merging can also be used to undo bad commits.
See for examplesSee for example:
http://stackoverflow.com/questions/13330011/how-to-revert-an-svn-commit
Make a branch
Warning | ||
---|---|---|
| ||
Making branches is an advanced operation. Ask a knowledgeable individual for advice before doing this for the first time. After branching to make major changes, make sure to change your IDE / editor to use the branch instead of the trunk. |
svn cp m "making a branch" ^/projects/foo/trunk ^/projects/foo/branches/foo-dev
Warning | ||
---|---|---|
| ||
Making tags is an advanced operation. Most general users do not need to make tags, and for Maven projects this is done automatically during the release procedures. Never change a tag once it is made. Should changes be required, the preferred method is making them in the trunk and then making a new tag. |
svn cp -m "making a tag" ^/projects/foo/trunk ^/projects/foo/tags/foo-1.2.3
...
This page shows the full syntax for the merge command.
Creating a development branch is done using the copy command.
No Format |
---|
svn cp m "Creating development branch." ^/projects/java/trunk ^/projects/java/branches/my-dev-branch |
Tagging is also performed by using the copy command.
No Format |
---|
svn cp -m "Creating a tag." ^/projects/hps/java/trunk ^/projects/hps/java/tags/mytag |
Typically, tags are not created by hand but through an automated build/release system.
You can replace a copy of a file in your working file with the repository version using a command like this.
No Format |
---|
svn revert path/to/broken/local/file |
You can also recursively revert entire directories and their sub-directories.
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!
...