Subversion HowTo
From BattletechMUX
How do I check out the BTMux source with Subversion?
Check the trunk out from Subversion with the following command:
svn co https://svn.sourceforge.net/svnroot/btonline-btech/btmux/trunk btmux
If you'd like a complete list of possible projects, see our svn viewer at http://svn.btmux.com. You may also refer to the Subversion Projects Page.
How do I check out one of the other projects?
If you want to check out one of the other projects such as text, just remember a few things:
- The repository root is https://svn.sourceforge.net/svnroot/btonline-btech/
- To check out a project, simply add the name to the end of the above listed repository root. See the SVN Repository for details.
For example, to check out the text project:
svn co https://svn.sourceforge.net/svnroot/btonline-btech/text
This will put a folder called text in your current directory. There will be three directories under this one usually:
- Tags
- Branches
- Trunk
Generally you're going to want the stuff under Trunk.
How do I update my source to the latest revision?
The easiest way to update your copy of a project is to enter your local copy's root directory and type:
svn update
How do I compare my local files to the repository's?
First you'll want to get a general overview of your source via the status command:
svn status
Will compare your entire tree.
svn status <file>
Will compare an individual file. You may go into greater detail and see line-by-line what is different from the repository by using one of the following formats of the diff command:
svn diff
Compares your entire tree to the repository version.
svn diff <file>
How do I create a patch to submit to the SourceForge project?
This is as simple as modifying a file and typing something like this:
svn diff > patchfile
This would create a patch containing any changes within the entire project you've checked out. If you wanted to create a patch for just one file:
svn diff <file> > patchfile
You would then send patchfile to our SourceForge patch tracker where it will be reviewed and accepted or rejected.
How do I revert a file to the repository's version?
If you make a mistake and would like to revert your local copy to the version in the repository, use the revert command:
svn revert <file>
Instead of reverting your entire tree, it is often better to just check it out again.
How can I see a detailed history of a file?
You can see a log of changes and commits via the svn log command:
svn log <file/directory>
How can I see detailed information on a file?
The info command can be used to see a variety of useful information on a file:
svn info <file/directory>
Developer Actions
How do I commit my changes to the repository?
| | Note: You must have write-access to the BTMux repository to do this. |
You must first either check out or point your Subversion client to:
https://svn.sourceforge.net/svnroot/btonline-btech/btmux/trunk
By doing something like:
svn co https://svn.sourceforge.net/svnroot/btonline-btech/btmux/trunk btmux
After you've made your changes, you may use one of the following forms of the commit command:
svn commit -m "<Summary of Changes>"
Commits all changes from your local tree to the repository.
svn commit -m "<Summary of Changes>" <file(s)>
Commits an individual file, or multiple files with spaces in between each name.
How do I import unversioned files into a new tree?
| |
How do I add files to the repository?
svn add
How do I delete files from the repository?
svn delete
How do I move files within the repository?
svn move <oldfile> <newfile>
How do I copy files within the repository?
svn copy <oldfile> <newfile>
