Versionierung mit Subversion - svn: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
(Versionierung mit Subversion)
 
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 1: Zeile 1:
 +
Stand 2019 hat sich Git als Versionierungssystem am meisten durchgesetzt. Viele Entwickler nutzen Github als Dienstleister und halten Ihren Code Online vor. ProcessWire liefert Module direkt über Github aus. Daher wird dieser Artikel nicht mehr  gepflegt.
 +
== Links ==
 +
[[Git]]
 
== Snippets ==
 
== Snippets ==
  
Zeile 11: Zeile 14:
 
=== Making a diff ===
 
=== Making a diff ===
 
Diffs, or patches, are text files which include all the changes done in the working copy. If you suggest a new feature in Bugzilla and like to suggest a change which fixes it, upload a patch.
 
Diffs, or patches, are text files which include all the changes done in the working copy. If you suggest a new feature in Bugzilla and like to suggest a change which fixes it, upload a patch.
To create a diff from the current repository, use the following command:
+
To '''create a diff from the current repository''', use the following command:
 
  svn diff
 
  svn diff
  
Zeile 17: Zeile 20:
 
  svn diff includes/SpecialMyAwesomePage.php
 
  svn diff includes/SpecialMyAwesomePage.php
 
Note that SVN defaults to the "unified" diff format, so the "-u" option doesn't have to be passed.
 
Note that SVN defaults to the "unified" diff format, so the "-u" option doesn't have to be passed.
 +
 +
=== Applying a diff ===
 +
Subversion does not contain a built in command to apply diffs to the current working copy (for example, to review or commit diffs published in Bugzilla); instead, you can use the regular '''patch unix utility''':
 +
patch -p0 < patch_file
 +
TortoiseSVN has a built-in support for applying a diff.

Aktuelle Version vom 22. Oktober 2019, 06:52 Uhr

Stand 2019 hat sich Git als Versionierungssystem am meisten durchgesetzt. Viele Entwickler nutzen Github als Dienstleister und halten Ihren Code Online vor. ProcessWire liefert Module direkt über Github aus. Daher wird dieser Artikel nicht mehr gepflegt.

Links[Bearbeiten]

Git

Snippets[Bearbeiten]

Checkout um Zweige herunter zu laden[Bearbeiten]

Beispiel Mediawiki Extension TitleKey in den Ordner TitleKey setzen:

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/TitleKey TitleKey

Updating the working copy[Bearbeiten]

To update your working copy and get the latest files, use the following command:

svn update #or just: "svn up"

Making a diff[Bearbeiten]

Diffs, or patches, are text files which include all the changes done in the working copy. If you suggest a new feature in Bugzilla and like to suggest a change which fixes it, upload a patch. To create a diff from the current repository, use the following command:

svn diff

Normally, unlike CVS, you don't have to tell SVN which files you changed; however, you may like to diff only a part of the repository. To do that, specify the files to diff:

svn diff includes/SpecialMyAwesomePage.php

Note that SVN defaults to the "unified" diff format, so the "-u" option doesn't have to be passed.

Applying a diff[Bearbeiten]

Subversion does not contain a built in command to apply diffs to the current working copy (for example, to review or commit diffs published in Bugzilla); instead, you can use the regular patch unix utility:

patch -p0 < patch_file

TortoiseSVN has a built-in support for applying a diff.