svn

1. SVN
1) create a new project :
    
 svn import -m 'new import' trainer http://svn.idapted.com/svn/projects/trainer

  • trainer doesn't need to exsit, svn will create it.
  • the svn url must be ../svn/..., cann't be ../browser/..
  • must have -m 'blabla'
  • After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout  a fresh working copy of the tree.


2) svn:externals

 
svn propedit svn:externals vendor/plugins
  [add the following line:]
  backgroundrb http://svn.devjavu.com/backgroundrb/trunk
  [exit editor]

  svn ci -m 'updating svn:external svn property for backgroundrb' 
  svn up 

  • The folder 'backgroundrb' must not exist in vendor/plugins on svn, otherwise it will be locked and you can not fetching external item into 'vendor/plugins/backgroundrb'
  • An externals definition can only point to directories, not files; The externals definition cannot point to relative paths (paths like ../../skins/myskin)
  • If you want to commit changes that you've made in one or more of those external working copies, you must run svn commit explicitly on those working copies—committing on the primary working copy will not recurse into any external ones.That is to say, you have to change to directory that is external(e.g. app/models) and run svn commit


3) svn:move
svn move -m 'sth' http://svn.idapted.com/svn/src1 http://svn.idapted.com/svn/newfolder/src2   

  • if src2 exists, then the contents of src1 including src1 will be created under src2, like .../src2/src1/src1children; if src2 doesn't exsit, then it will be ../src2/src1children, it's just like "svn move and rename"


4) svn:merge
The way you rollback to an earlier version of your repository is to do a reverse merge.
Here’s the example off the SVN site. It will do a reverse merge, and roll back the commit you made in version 303.
    $ svn merge -c -303 http://svn.example.com/repos/calc/trunk

The ‘-c M’ option is equivalent to ‘-r N:M’ where N = M-1.
Using ‘-c -M’ does the reverse: ‘-r M:N’ where N = M-1.

你可能感兴趣的:(C++,c,SVN,C#,UP)