Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:svn_tips

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
becki:linux:svn_tips [2010-02-26 14:52]
becki
becki:linux:svn_tips [2015-11-04 14:32] (aktuell)
becki
Zeile 6: Zeile 6:
 ===== Apache Server Configuration == ===== Apache Server Configuration ==
  
-  * Add the following to /​etc/​httpd/​httpd.conf and restart Apache:<​code>​+  * Uncomment or add the following to /​etc/​httpd/​httpd.conf and restart Apache:<​code>​ 
 +LoadModule auth_digest_module lib/​httpd/​modules/​mod_auth_digest.so 
 +LoadModule dav_module lib/​httpd/​modules/​mod_dav.so
 LoadModule dav_svn_module lib/​httpd/​modules/​mod_dav_svn.so LoadModule dav_svn_module lib/​httpd/​modules/​mod_dav_svn.so
 LoadModule authz_svn_module lib/​httpd/​modules/​mod_authz_svn.so LoadModule authz_svn_module lib/​httpd/​modules/​mod_authz_svn.so
Zeile 22: Zeile 24:
 </​code>​ </​code>​
   * Create the directiory ''/​home/​svn''​   * Create the directiory ''/​home/​svn''​
-  * Add one or more users with [[install_config_tips#​protect_a_directory_with_digest_authentication|htdigest]]+  * Add one or more users with [[apache_httpd#​protect_a_directory_with_digest_authentication|htdigest]]
   * Type ''​svnadmin create /​home/​svn/​test''​ to create a repository called ''​test''​   * Type ''​svnadmin create /​home/​svn/​test''​ to create a repository called ''​test''​
   * Type ''​chown -R apache:​apache /​home/​svn/​*''​   * Type ''​chown -R apache:​apache /​home/​svn/​*''​
Zeile 28: Zeile 30:
  
 ===== svnserve Server Configuration == ===== svnserve Server Configuration ==
 +
 +<​note>​This is not necessary if Apache Server (see above) is used!</​note>​
 +
 ==== Required == ==== Required ==
  
Zeile 89: Zeile 94:
  
 Add user ''​nobody''​ (Apache) to group ''​svn''​ in ''/​etc/​group''​ to give Apache read permission for the svn repository. Then restart Apache and point your browser to http://​server-hostname/​cgi-bin/​viewvc.cgi/​. Add user ''​nobody''​ (Apache) to group ''​svn''​ in ''/​etc/​group''​ to give Apache read permission for the svn repository. Then restart Apache and point your browser to http://​server-hostname/​cgi-bin/​viewvc.cgi/​.
 +
 +===== Other Administration ==
 +==== Rename a Repostitory ==
 +
 +Just use normal ''​mv''​ as root. [[http://​svnbook.red-bean.com/​en/​1.7/​svn.reposadmin.maint.moving-and-removing.html|See also]]
 +
 +==== Locks ==
 +
 +View and remove locks: ​
 +  svnadmin lslocks /​local/​path/​to/​repo
 +  svnadmin rmlocks /​local/​path/​to/​repo
 +
 +Clients can remove own and other locks as well. See below!
 +
 +[[svnbook>​1.7/​svn.ref.html|more]]
  
 ===== Client Configuration == ===== Client Configuration ==
Zeile 112: Zeile 132:
  
 The import command imports the ''​testproj''​ project to the root dir of the repostitory also as project ''​testproj''​ The import command imports the ''​testproj''​ project to the root dir of the repostitory also as project ''​testproj''​
 +
   becki@client:​~/​test$ svn import testproj http://<​servername>/<​svnrootdir>/<​reponame>/​testproj   becki@client:​~/​test$ svn import testproj http://<​servername>/<​svnrootdir>/<​reponame>/​testproj
  
Zeile 193: Zeile 214:
 === Intro == === Intro ==
  
-<note tip>​[[svnbook>​1.5/​svn.ref.svn.c.merge.html|Merging]] [[svnbook>​1.4/svn.branchmerge.copychanges.html#​svn.branchmerge.copychanges.keyconcept|means]]: Apply the changes between repository tree X and repository tree Y into the working directory. Any revision on any branch is a repository tree.</​note>​+<note tip>Merging ([[svnbook>​1.5/​svn.branchmerge.advanced.html#​svn.branchmerge.advanced.advancedsyntax|explanation]] [[svnbook>​1.5/svn.ref.svn.c.merge.html|manpage]]): Apply the changes between repository tree X and repository tree Y into the working directory. Any revision on any branch is a repository tree.</​note>​
  
   * FIXME Verify: Merging is not symmetrical,​ i.e. if a line was added to a file between rev X and rev Y, than ''​merge X Y''​ will add that line to the file in the working dir and ''​merge Y X''​ will //remove// that line!   * FIXME Verify: Merging is not symmetrical,​ i.e. if a line was added to a file between rev X and rev Y, than ''​merge X Y''​ will add that line to the file in the working dir and ''​merge Y X''​ will //remove// that line!
Zeile 201: Zeile 222:
   * It is also possible to specify only one repository tree source (e.g. the tunk) with the merge command. In this case, all modifications of the trunk since you first created your branch (which you work on) are applied to the working dir. Used e.g to [[svnbook>​1.5/​svn.branchmerge.basicmerging.html#​svn.branchemerge.basicmerging.stayinsync|keep a branch in sync]].   * It is also possible to specify only one repository tree source (e.g. the tunk) with the merge command. In this case, all modifications of the trunk since you first created your branch (which you work on) are applied to the working dir. Used e.g to [[svnbook>​1.5/​svn.branchmerge.basicmerging.html#​svn.branchemerge.basicmerging.stayinsync|keep a branch in sync]].
   * For merging finishd branches which are to be discontinued and merged back into the trunk, the ''​--reintegrate''​ option is [[svnbook>​1.5/​svn.branchmerge.basicmerging.html#​svn.branchemerge.basicmerging.stayinsync|necssary]]   * For merging finishd branches which are to be discontinued and merged back into the trunk, the ''​--reintegrate''​ option is [[svnbook>​1.5/​svn.branchmerge.basicmerging.html#​svn.branchemerge.basicmerging.stayinsync|necssary]]
 +  * AFAIK it is not possible to easily keep two branches in sync (merge in both directions) like in [[mercurial_tips#​merging|Mercurial]]. Basic merging in SVN is meant to frequently update branches from the trunk and finally reintegrate the branch into the trunk. To keep two branches in sync, advanced merging (with manual bookkeeping about what has already been merged) is necessary.
  
 === Use Cases == === Use Cases ==
Zeile 209: Zeile 231:
   * Undo committed Changes, see below   * Undo committed Changes, see below
  
-==== Handling Variants ​ == 
  
-This section describes how to create e.g. client-specific variants of the same main project eg. for special needs of customers.+==== Undoing Changes == 
 +=== Undoing lokal Changes ==
  
-FIXME To be tested!+See [[svnbook>​1.4/​svn.ref.svn.c.revert.html|revert]]
  
-First separate customer specific things from common things. Common things are the same for all customers. Separate into different files or directories. Then create a branch of the whole project for each customer:+=== Undoing committed Changes ==
  
-  ​project +  ​svn merge [--dry-run] -r 627:480 http://​url/​project
-  |-- branches +
-  |   |-- customerA +
-  |   ​| ​  |-- commmon +
-  |   ​| ​  `-- individual (specific for customerA) +
-  |   `-- customerB +
-  |       |-- commmon +
-  |       `-- individual (specific for customerB) +
-  `-- trunk +
-      |-- commmon +
-      `-- individual (default or empty)+
  
-''​switch''​ or ''​checkout''​ your working dir to a customer branch, e.g. '​project/branch/customerA'​. Work on //any// files or dirsCommit when you are done. Now update to the trunk and ''​merge''​ only the common files / dirs from branch customerA into the trunk.+This command removes all changes which have been done between r480 and r627 //in the workin copy//. Afterwards a commit is necessary.
  
-When you want to continue on branch customerB, you first have to merge all the common things from the trunkAnd again, when you are done with the canges on branch customerB, merge the common things back to the trunk.+See also [[svnbook>​1.4/svn.branchmerge.commonuses.html]] -> Undoing Changes
  
-This way the trunk serves as a central mini reposititory for the common things of all customer branches. Common things are always pulled from and pushed back to the trunk, whereas customer specific things are kept isolated in the branches.+=== Commit Log Message Correction ==
  
-It may also be an option to work with a [[http://svnbook.red-bean.com/​en/​1.5/​svn.branchmerge.switchwc.html|mixed working copy]], comprised of the common parts from the trunk and the specific parts from the appropriate customer branch!+Example: 
 +  svnadmin setlog ​/path/to/​repository --bypass-hooks logmessage.txt -r 25120
  
-==== Undoing Changes == +See also: [[svnbook>​1.5/​svn.reposadmin.maint.html#​svn.reposadmin.maint.setlog|Svnbook]]
-=== Undoing lokal Changes ==+
  
-See [[svnbook>​1.4/​svn.ref.svn.c.revert.html|revert]]+==== Locks ==
  
-=== Undoing committed Changes ==+View locks: 
 +  svn st -u 
 + 
 +  * O: Lock from someone else 
 +  * K: Own lock 
 + 
 +Create and remove locks:  
 +  svn lock file 
 +  svn unlock file 
 + 
 +[[svnbook>​1.7/​svn.advanced.locking.html|more]] -> from "​Discovering Locks" on
  
-  svn merge [--dry-run] -r 627:480 http://​url/​project 
  
-This command removes all changes which have been done between r480 and r627 //in the workin copy//. Afterwards a commit is necessary. 
  
-See also [[svnbook>​1.4/​svn.branchmerge.commonuses.html]] -> Undoing Changes 
  
becki/linux/svn_tips.1267195935.txt.gz · Zuletzt geändert: 2010-02-26 14:52 von becki

Impressum - Datenschutzerklärung