Tortoise Subversion 1.6.6 Last revised/verified: 2009-10-22
is a subversion client that works inside Explorer letting you do your work with
right clicks. It is not quite a full-featured, but it is simpler since is uses
the familiar directory displays.
gmane.comp.version-control.subversion.tortoisesvn.user
is a newsgroup to discuss TortoiseSVN. It is carried free on newsserver news.gmane.org.
You will need a newsreader to access it, not a browser.
Steps
Here are the basic TortoiseSVN operations:
- Create the repository.
- Configure your global-ignores.
- Configure your auto-props in C:\Users\User\AppDate\Roaming\Subversion\config,
acessible via right click TortoiseSVN ⇒ Settings ⇒
edit something like this:
- Import a directory tree into the repository. As with
all version control systems, it takes some experimenting so that when you import
a directory or file, it goes where you expect it to in the repository tree. One
of the easiest ways to get started is to use the repo-browser, navigate in the
repository of the parent of the directory you want to add and select add
folder.
- Checkout part of the repository, usually to a
different spot on disk from where you imported it from.
- Make a change to some of the checked out files.
- Use Update to fetch any recent changes to the
repository made by other people. Subversion will attempt to merge your changes
with those of other people. You will have to look its attempt over and correct
any errors.
- Commit the merged changes to record them in the
repository.
- Add a file, group of files or dir to the repository
that are not represented there (perhaps out of date) already.
- Commit the add. The files are not copied to the
repository until you do the commit of all previous adds in one fell swoop.
- Delete a file from the checked out files.
- Commit the deletion. This will mark the file as
deleted in the repository, but keep the previous update history.
- Use the Repo-Browser delete of a file or directory.
This will delete all history of this file or directory from the respository.
Global Ignores
The TortoiseSVN client in 100% responsible for deciding what files and
directories will be included/excluded from the the repository. The server
accepts everything. You can specify a set of global excludes, or as Subversion
calls them ignores, like this: *.class
*.com *.digest *.exe *.jar *.log *.log.html *.lst *.map *.obj *.raw *.ser *.sln
*.table *.tmp *.zip */javadoc */jetpdb Debug javadoc jetpdb Release temp.* temp?.*
temp?.*. Note how you must specify directories to exclude twice, once
with and once without the /. Otherwise,
when they are the direct child folder of the import directory they will not
match since there is no / in the name. This is the side effect of the way
Tortoise does filename pattern matching with regexes rather than wildcards.
You can specify the excludes in the global ignore
settings, or in the Subversion configuration file with:
global-ignores =
*.class *.com *.digest *.exe *.jar *.log *.log.html *.lst
*.map *.obj *.raw *.ser *.sln *.table *.tmp *.zip */javadoc */jetpdb Debug
javadoc jetpdb Release temp.* temp?.* temp?.*
or after you have done a checkout, add by right clicking on a file or directory
you do not want to include, and selecting add to ignore list.
Oddly, you can’t make such file-by-file two-click exclusions prior to or
during the import. Adding ignores won’t delete any existing files or
directory from the repository. It is merely a list of what you want to ignore,
not what everyone has to ignore.
Files
TortoiseSVN will create a .svn directory in any
directory you have checked out. Don’t delete or modify any of the files in
it. It is considerably bigger than the equivalent .cvs
directory.
It creates *.r0 and *.r108
files corresponding to *.png images in your checkout
directory, not the .svn directory! I don’t know
why it does this or what these are for. It is rather improper behaviour in my
opinion.
Tips
- Use cleanup and/or update
when TortoiseSubversion appears to be giving the wrong status to your files or
directories.
- Use commit with the show unversioned files option to
find out which files you have failed to add or explicitly exclude.
- Use the recent message option to find the reason text
of recent commits rather than typing it over and over.
- Subversion has three sources of information:
- The repository. You can find out what is on file with the repo-browser.
- The .svn subdirectories of any directory under version
control. The very existence of this directory is evidence it is under Subversion
control. These must not be meddled with, not even redated, except as a last
resort.
- The current contents of the client files.
Subversion is rather delicate for a backup tool. It is very easy to get it out
of sync, to accidentally delete or to fail to save.
- Don’t use any other tools but Tortoise Subversion and svn to delete or
rename files under Subversion control.
- Use svn.exe for repetitive work. I found it easier to
learn than Tortoise because you can type svn help
revert etc. and it will not only explain how to use the command, it will
explain what it does.
Deleting
If you accidentally add a file to the repository, you can un-add it if you have
not committed yet.
If you want to delete the file on your disk and mark it as deleted in the
repository, use SVN delete then commit.
If you want to keep the file on your disk, but no longer track it in the
replository, use SVD delete and add to ignore list, then commit.
If you want to delete all record of the file of ever having existing from the
repository, find it is the repo-browser, and delete it and use delete to delete
it from your hard disk.
Disadvantages of Tortoise Subversion
- TortoiseSubversion often gives you the wrong status for a directory or file.
Sometimes it is just lazy in updating. Sometimes it gets confused. Using Cleanup
and Update often clear the problem.
- Cleanup crashes TortoiseSubversion every time I use it, however, it does its
work before crashing.
- TortoiseSubversion often ignores your global includes. Running cleanup often
gets it back on track.
- You can’t sort files by status. This makes it hard to find one needle file
in the haystack that is causing trouble.
- Global ignores are not global. The value displayed at any level in the directory
differs from the value in the file.
- This is a small flaw but it is highly irritating. Its progress meters stop half
way when the work is done. I find myself waiting for it to complete long after
it actually has completed because I have been watching the progress meter,
waiting for it to complete.
- If anything happens to its svn directory, cleanup may not be sufficient to
recover. Sometimes the only way I could get it working again was to save my
files elsewhere, delete the what I no longer wanted to track from the repository
with repo-browser, then delete the entire directory containing the directories I
just attempted to delete from my local hard disk, the do an update, then copy
back in my files and recommit. Smaller hammers include: cleanup, update, resolve,
revert. It should be able to recover loss or deletion of the svn files without
the massive spoon feeding it currently requires.
- If you accidentally click delete and add to ignore list
even if you detect the problem before committing that delete, there is no way I
could find to undo it. Any attempt will render your files in conflicted state.
- If you try to delete a directory, when you still have uncommitted changes
pending, it sulks.
- Even when you are the sole user of your repository, it often secretly wants you
to update before commit to update your local files with potential changes from
other users.