Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
subversion [2007/09/28 03:14] bojar |
subversion [2008/09/19 12:31] zeman Opraveny nerozbalené entity pro menšítka a většítka. |
||
---|---|---|---|
Line 3: | Line 3: | ||
Subversion ('' | Subversion ('' | ||
- | Pro projekty | + | Subversion vám poskytuje různé možnosti, kde založit tzv. **repozitář** (tedy archív verzí vašeho projektu), a různé možnosti, jak k němu přistupovat. **Lokální repozitář** vám stačí, používáte-li Subversion pro archivaci projektu, na kterém pracujete pouze vy, případně i další členové |
+ | Pro projekty ÚFALu, na nichž chcete spolupracovat i s lidmi zvenku, (serverové repozitáře) použijte vyhrazený stroj [[internal: | ||
- | ===== Nové Milanovo shrnutí | + | ===== Subversion Server ===== |
+ | |||
+ | Toto je Milanovo | ||
Mili kolegove, | Mili kolegove, | ||
Line 15: | Line 18: | ||
- pak se rozhodnete kterymi cestami budete s projektem pracovat - nejlepsi je asi nakonfigurovat vsechny (viz. nize) - tedy svn, webovy pristup do svn a Trac (take webovy). Vsude jsou prednastaveny nejake zakladni ucty, ale nejlepsi je tyto veci upravit podle vlastnich potreb. Napriklad nemusite chtit, aby ufal/ | - pak se rozhodnete kterymi cestami budete s projektem pracovat - nejlepsi je asi nakonfigurovat vsechny (viz. nize) - tedy svn, webovy pristup do svn a Trac (take webovy). Vsude jsou prednastaveny nejake zakladni ucty, ale nejlepsi je tyto veci upravit podle vlastnich potreb. Napriklad nemusite chtit, aby ufal/ | ||
- | + | ==== Konfigurace webového rozhraní SVN (preferováno) | |
- | + | ||
- | + | ||
- | + | ||
- | ==== Konfigurace webového rozhraní SVN ==== | + | |
Toto rozhraní je užíváno SVN klienty, kteří dostanou repository udanou ve tvaru '' | Toto rozhraní je užíváno SVN klienty, kteří dostanou repository udanou ve tvaru '' | ||
Line 31: | Line 30: | ||
Konfiguraky jsou globalni, tj. pro vsechny projekty spolecne. | Konfiguraky jsou globalni, tj. pro vsechny projekty spolecne. | ||
+ | O přidávání uživatelů a hesel viz níže. | ||
==== Konfigurace protokolu SVN ==== | ==== Konfigurace protokolu SVN ==== | ||
Line 68: | Line 67: | ||
# na heslo budete dotázáni, heslo se nezobrazí ani na terminálu | # na heslo budete dotázáni, heslo se nezobrazí ani na terminálu | ||
- | ----------------------------------------------------------------------------------------------------------- | ||
- | Doufam, ze timto shrnutim zajistime optimalni vyuziti | + | ===== Lokální Subversion ===== |
- | Milan | + | //(Z návodu ve wiki University of Maryland převzal a upravil Dan Zeman.)// |
- | ===== Setting Up an Archive ===== | + | Tento návod se týká lokálních repozitářů SVN, tedy takových, ke kterým budete přistupovat pouze z linuxových počítačů v síti ÚFALu. |
You can use svn to keep track of your own code. | You can use svn to keep track of your own code. | ||
Line 81: | Line 79: | ||
< | < | ||
- | **Beware!** Do not use older versions (e.g. 1.1.4) of Subversion to create a repository! By default, they will use the Berkeley DB backend, which is not recommended. You may be able to " | + | **Beware!** Do not use older versions (e.g. 1.1.4) of Subversion to create a repository! By default, they will use the Berkeley DB backend, which is not recommended. You may be able to " |
Let's say you want to archive the directory ''/ | Let's say you want to archive the directory ''/ | ||
Line 101: | Line 99: | ||
rm -rf proj.old | rm -rf proj.old | ||
</ | </ | ||
+ | |||
+ | Výše uvedený postup je možné po úpravách použít i pro vzdálený repozitář na serveru SVN. Předpokládáme, | ||
+ | |||
+ | < | ||
+ | mv $PROJ $PROJ.old | ||
+ | mkdir tmp | ||
+ | cd tmp | ||
+ | mkdir $PROJ | ||
+ | cp -r / | ||
+ | mkdir $PROJ/ | ||
+ | mkdir $PROJ/tags | ||
+ | svn --username $USER import $PROJ https:/// | ||
+ | cd .. | ||
+ | svn checkout -q https:/// | ||
+ | rm -rf tmp | ||
+ | rm -rf $PROJ.old</ | ||
+ | |||
+ | Pokud jste si jisti, že pro tento projekt nebudete nikdy potřebovat větve ani otagované verze, můžete pravděpodobně vynechat vytváření podsložek '' | ||
===== Přechod z CVS pod SVN ===== | ===== Přechod z CVS pod SVN ===== | ||
Line 356: | Line 372: | ||
This command takes the differences between the alopez branch from rev. 250 to 271, and applies them to the working copy. Note that this may create conflicts! | This command takes the differences between the alopez branch from rev. 250 to 271, and applies them to the working copy. Note that this may create conflicts! | ||
+ | |||
===== Tags ===== | ===== Tags ===== | ||
Line 376: | Line 393: | ||
</ | </ | ||
- | === [[VersionControlTags|Current Tags and Branches]] === | ||
- | === Rolling Back Versions === | + | ===== Rolling Back Versions |
What do you do if something is broken that wasn't broken before? | What do you do if something is broken that wasn't broken before? | ||
- | '' | + | '' |
This will show you the change log. Hopefully, this will be sufficiently informative as to when particular changes occurred, but if you aren't sure what happened in a particular revision, you can always run | This will show you the change log. Hopefully, this will be sufficiently informative as to when particular changes occurred, but if you aren't sure what happened in a particular revision, you can always run | ||
- | '' | + | '' |
To see the changes that have been made. Once you figure out which version you need, you can restore your working copy to that revision using | To see the changes that have been made. Once you figure out which version you need, you can restore your working copy to that revision using | ||
- | '' | + | '' |
- | === Setting Up an Archive === | + | ===== Setting Up an Archive |
You can use svn to keep track of your own code. Let's say you want to archive the directory ''/ | You can use svn to keep track of your own code. Let's say you want to archive the directory ''/ | ||
Line 417: | Line 433: | ||
See [[VersionControlSetup|VersionControlSetup]] for the series of commands used to set up the MTEval archive. | See [[VersionControlSetup|VersionControlSetup]] for the series of commands used to set up the MTEval archive. | ||
- | === Stupid Repository Tricks === | + | |
+ | ===== Stupid Repository Tricks | ||
You can accomplish virtually anything you can imagine with the repository, although it may not be immediately obvious how. For instance: | You can accomplish virtually anything you can imagine with the repository, although it may not be immediately obvious how. For instance: | ||
- | : $ Get the latest revision number of your current branch | + | * Get the latest revision number of your current branch: '' |
- | :You can also try '' | + | |
- | + | | |
- | : $ View the logs of all changes to your current branch since you last updated.: '' | + | |
- | + | | |
- | : $ View all the differences between your working copy and the latest revision of your current branch.: '' | + | |
- | + | ||
- | : $ Merge into your current working copy the bug fixes checked in to r475 of the bittorrent branch (even if that's not your working branch).: '' | + | |
- | + | ||
- | : $ Change your mind when you realize those bug fixes did more harm than good.: '' | + | |
- | + | ||
- | === Troubleshooting === | + | ===== Troubleshooting |
If you get the message: | If you get the message: | ||
Line 451: | Line 461: | ||
* pray | * pray | ||
- | === Further Reading === | + | ===== Further Reading |
All of the information in this tutorial comes directly from the online [http:// | All of the information in this tutorial comes directly from the online [http:// | ||
Line 463: | Line 473: | ||
Most likely, this is all you will need to look at to do most of your work. Most of this material comes from Section 3.5. | Most likely, this is all you will need to look at to do most of your work. Most of this material comes from Section 3.5. | ||
- | [[Category: |