% svn mkdir -m "initial revision" file:///usr/local/svnroot/MilleBorks
% mkdir DungeonBorkventure % cd DungeonBorkventure % mkdir branches tags trunk # put source files into trunk % svn import . file:///usr/local/svnroot -m "initial checkin" % cd .. % rm -rf DungeonBorkventure # or move it aside % svn checkout file:///usr/local/svnroot/trunk DungeonBorkventure % cd DungeonBorkventure # and get to work
First, make the directories in the repository:
% svn mkdir -m "initial revision" file:///usr/local/svnroot/DungeonBorkventure % svn mkdir -m "initial revision" file:///usr/local/svnroot/MilleBorksThen import the different code bases:
% cd /path/to/DungeonBorkventure % svn import -m "initial revision" . file:///usr/local/svnroot/DungeonBorkventure % cd /path/to/MilleBorks % svn import -m "initial revision" . file:///usr/local/svnroot/MilleBorksThen checkout working copies of the projects:
% cd /work/and/play/area % svn checkout file:///usr/local/svnroot/MilleBorks/trunk MilleBorks % svn checkout file:///usr/local/svnroot/DungeonBorkventure/trunk DungeonBorkventure
svn status
. Add this to your ~/.subversion/config
file.
[miscellany] global-ignores = build *.mode* *.pbxuser *~.nib .DS_Store *~Now it won't bug me about the build directory the -per-user Xcode files, nib backup files, the #$&!! .DS_Store file that the Finder litters everywhere, and also don't bug me about emacs backup files.
You can search for global-ignores
in that file to see some info about the setting. You might want to check out Spring Cleaning with Subversion too.
$ zip ~/modified.zip $(svn status | grep ^M | awk '{ print $2;}')(Bash syntax)
% svnadmin create --fs-type fsfs /usr/local/svnroot/
% svn copy file:///usr/local/svnroot/HackDie/trunk file:///usr/local/svnroot/HackDie/tags/stable-1 -m "tag for HackDie internal stable release #1"
% svn status --show-updates
You can specify files and directories of interest.
% svn log -v -r 373 ------------------------------------------------------------------------ r373 | markd | 2005-06-22 16:05:38 -0400 (Wed, 22 Jun 2005) | 1 line Changed paths: A /xyz/trunk/docs/bugreports/4158233-nsbrowser A /xyz/trunk/docs/bugreports/4158233-nsbrowser/browser-rows.png A /xyz/trunk/docs/bugreports/4158233-nsbrowser/browserdraw.tar.gz A /xyz/trunk/docs/bugreports/4158233-nsbrowser/bug.txt initial revision ------------------------------------------------------------------------and you can look repository-wide too:
% svn log -v -r 373 file:///usr/local/svnroot/
% svn mkdir -m "initial revision" svn+ssh://borkware.com/path/to/svnroot/thingie
% svn add bunnies@2x.png svn: warning: 'bunnies' not found % svn add bunnies@2x.png@ A bunnies@2x.png(thanks to Gus Mueller, Mike Ash, and Guy English)
% svn switch --relocate http://from-address.flongswozzle.net http://to-address.borkware.comMuchos thankos to Lucas Eckels for the tip.
If you're in control of the repository, you can put the proper log message into a text file, and hack your repository (assuming oop.txt has the new comment contents, and it was revision 285 that accidentally got All The Things):
% cd parent-directory-of-repository % svnadmin --bypass-hooks setlog ./svnroot -r 285 /tmp/oop.txtIf your repository is more than "just your own thing", you might want to follow the more complicated instructions at at the Subversion FAQ.