SVN USAGE
(1) Help
> svn help import
(2) Import
> svnadmin create f:/svnroot/test
> svn import "C:/Documents and Settings/MSPL/Desktop/Test" svn://localhost/Test -m "Initial import"
> svn list svn://localhost/test
(3) Checkout
> svn checkout svn://localhost/test
(4) Basic Work Cycle
Update your working copy
• svn update
• Make changes
• svn add
• svn delete
• svn copy
• svn move
• Examine your changes
• svn status
• svn diff
• Possibly undo some changes
• svn revert
• Resolve Conflicts (Merge Others' Changes)
• svn update
• svn resolved
• Commit your changes
• svn commit
(5) svn log
explicitly specify read permission, * = r
, or all the operation related with revision version will fail,such as svn merge ,
svn log , svn diff ,etc.
svn cleanup does: it searches your working copy and runs any leftover logs, removing working copy locks in the process. If Subversion ever tells you that some part of your working copy is “locked”, then this is the command that you should run. Also, svn status will display an L next to locked items:
deltification (or, “deltified storage”) within the repository itself. Deltification involves encoding the representation of a chunk of data as a collection of differences against some other chunk of data.
Sample :
> svnserve.exe -d -r f:/svnroot
> sc create svn binpath= "D:/Program Files/CollabNet/Subversion Server/svnserve.exe --service -r f:/svnroot" displayname= "Subversion Server" depend= Tcpip start= auto
> sc delete "SVNService"
List locks:
> svnadmin lslocks f:/SVNROOT/test
Steal/ broke locks:
> svn lock --force
External Definitions:
> svn propget svn:externals calc
Create Change List
> svn changelist math-fixes integer.c mathops.c
Client Credentials Caching : Runtime Configuration Area
Cheap Copy : Copy On Write
Create Branch :
> svn copy http://svn.example.com/repos/calc/trunk /
http://svn.example.com/repos/calc/branches/my-calc-branch /
-m "Creating a private branch of /calc/trunk."
> svn merge http://svn.example.com/repos/calc/trunk
svn merge to replicate your branch changes back into the trunk
> svn merge --reintegrate http://svn.example.com/repos/calc/branches/my-calc-branch
> svn propget svn:mergeinfo
svn merge usage:
1. Divide repository into 3 parts, (trunk , branches ,tags );
2. Copy trunk into branch /branck1;
3. Check out branch1, and edit in branch1;
4. merge work copy of branch1 to trunk . (merge from high version to low version to roll back history)
Sample:
> svn cp
> svn ci
> svn merge -r HEAD:1 ../branchs/branch1 OR
> svn merge ../branchs/branch1@4 ../branchs/branch1@5
> svn merge --reintegrate svn://localhost/Test/branchs/branch1
> svn propget svn:mergeinfo .
> svn revert --recursive
> svnadmin dump myrepos -r 0:1000 > dumpfile1
> svnadmin load newrepos < dumpfile1
> svndumpfilter include calc < repos-dumpfile > calc-dumpfile
> svnadmin hotcopy /var/svn/repos /var/svn/repos-backup
SVN Server
Apacha:
using the mod_dav_svn module, WebDAV/DeltaV protocol,
Svnserve:
custom protocol,use SASL to provide a variety of authentication and encryption options, it has no logging or built-in web browsing.
Apacha :
• getting httpd 2.0 up and running with the mod_dav module,
• installing the mod_dav_svn plugin to mod_dav, which uses Subversion's libraries to access the repository, and
• configuring your httpd.conf file to export (or expose) the repository.
Architecture
Repository Layer :
versioned filesystem implementation (accessed via libsvn_fs, and supported by its libsvn_fs_base and libsvn_fs_fs plugins), and the repository logic that wraps it (as implemented in libsvn_repos)
Repository Access (RA) Layer : libsvn_ra_neon, libsvn_ra_local, libsvn_ra_serf, and libsvn_ra_svn
Client Layer : libsvn_wc
Memory Pools
APR to allocate the memory from a memory pool. When you're finished using the objects you've created in the pool, you destroy the entire pool, effectively de-allocating the memory consumed by all the objects you allocated from it. Thus, rather than keeping track of individual objects that need to be de-allocated, your program simply considers the general lifetimes of those objects and allocates the objects in a pool whose lifetime (the time between the pool's creation and its deletion) matches the object's needs.
SVN USAGE
最新推荐文章于 2025-08-05 15:20:50 发布