Quickies

[categories] [index] [all (527)] [latest]

Subversion
  1. $ svn add iPhone/Icon@2x.png@
    A  (bin)  iPhone/Icon@2x.png
    
  2. $ svn propset svn:ignore '*.pbxuser' '*.perspectivev3' MyProject.xcodeproj
    $ svn commit -m "added propset to exclude personnal project files"
    
  3. $ find . -name .svn -print0 | xargs -0 rm -rf
    

    great with an alias in your ~/.profile

    alias rmSVN="find . -name .svn -print0 | xargs -0 rm -rf"
    
  4. create the repository

    $ svnadmin create /Users/nst/Library/SVNRep --fs-type fsfs
    

    create the initial file tree

    $ mkdir /tmp/svn_layout
    $ mkdir /tmp/svn_layout/branches
    $ mkdir /tmp/svn_layout/tags    
    $ mkdir /tmp/svn_layout/trunk
    

    import the initial file tree

    $ svn import /tmp/svn_layout file:///Users/nst/Library/SVNRep -m "initial import"
    

    import a project

    $ svn import LifeLine file:///Users/nst/Library/SVNRep/trunk/LifeLine -m "LifeLine initial import"
    

    list the projects

    $ svn list file:///Users/nst/Library/SVNRep/trunk/
    

    get a project

    $ svn checkout file:///Users/nst/Library/SVNRep/trunk/LifeLine LifeLine
    

    display logs

    $ pwd
    /Users/nst/Documents/Projects/LifeLine
    $ svn log
    ------------------------------------------------------------------------
    r2 | nst | 2007-06-03 16:06:47 +0200 (Dim, 03 jui 2007) | 1 line
    
    LifeLine initial import
    ------------------------------------------------------------------------
    

    for the rest

    See the svnbook.

  5. $ svn log -v -r {`date -v-3d "+%Y-%m-%d"`}:HEAD
    

    https://twitter.com/zacwhite/statuses/1965487642

  6. Tag the current version:

    $ svn copy https://swisssms.googlecode.com/svn/trunk \
               https://swisssms.googlecode.com/svn/tags/release-1.2 \
               -m "tag on release 1.2"
    
    $ svn copy file:///Users/nst/Library/SVNRep/trunk/phpMyFlatSite \
               file:///Users/nst/Library/SVNRep/tags/mfs_0_1 \
               -m "tag on mfs 0.1"
    

    Tag a old version:

    $ svn copy -r 13 \
        https://swisssms.googlecode.com/svn/trunk \
        https://swisssms.googlecode.com/svn/tags/release-1.1 \
        -m "forgotten tag on release 1.1"