Archive:Getting Started/Sources/Snapshots (zh CN): Difference between revisions
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
next=[[../../Build/KDE4|构建 KDE4]]| | next=[[../../Build/KDE4|构建 KDE4]]| | ||
reading=[[../../Sources/Anonymous_SVN| | reading=[[../../Sources/Anonymous_SVN|匿名使用 SVN 快速指南]]<br>[[../../Increased_Productivity_in_KDE4_with_Scripts|在 KDE4 使用脚本来提高效率]]<br>[[Development/Tutorials/CMake | CMake 简介]]| | ||
}} | }} | ||
如果要同步一个 KDE 模块的源代码,有一个方法可以让原先同步比较慢的过程变快很多,因为 KDE 源代码仓库会自动生成快照, | |||
If you are trying to checkout a KDE source module, then there is a way to make the normally slow process of the initial checkout happen a lot quicker, thanks to automatically generated snapshots of the KDE source repository, which are stored in convenient archived form in the KDE FTP system. This page describes how to perform a checkout using a module snapshot. | If you are trying to checkout a KDE source module, then there is a way to make the normally slow process of the initial checkout happen a lot quicker, thanks to automatically generated snapshots of the KDE source repository, which are stored in convenient archived form in the KDE FTP system. This page describes how to perform a checkout using a module snapshot. | ||
Revision as of 11:41, 8 July 2008
Getting Started/Sources/Snapshots
Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenčina | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
Tutorial Series | 开始入门 |
Previous | None |
What's Next | [[../../Build/KDE4|构建 KDE4]] |
Further Reading | [[../../Sources/Anonymous_SVN|匿名使用 SVN 快速指南]] [[../../Increased_Productivity_in_KDE4_with_Scripts|在 KDE4 使用脚本来提高效率]] CMake 简介 |
如果要同步一个 KDE 模块的源代码,有一个方法可以让原先同步比较慢的过程变快很多,因为 KDE 源代码仓库会自动生成快照, If you are trying to checkout a KDE source module, then there is a way to make the normally slow process of the initial checkout happen a lot quicker, thanks to automatically generated snapshots of the KDE source repository, which are stored in convenient archived form in the KDE FTP system. This page describes how to perform a checkout using a module snapshot.
Keep in mind that these snapshots are real Subversion checkouts, containing all of the required Subversion metadata. This procedure can in fact be the quickest way to checkout a module, thanks to the abundance of FTP mirrors.
Get the snapshot
First go to The KDE Mirror Redirector and choose the best FTP server for your location. Usually this will be a server in your country/state. Click on the link for the FTP server and navigate to the snapshots directory. In this directory will be a large list of KDE modules which are archived.
You want to download the module with the name in the following format: kdemodule-svn.tar.bz2. Go ahead and save this archive to your hard disk somewhere. You'll need to be able to reach this location from the command line later.
The Recipe
Now for the checkout, go ahead and open a terminal shell and perform the following steps:
cs # cs is not a typo tar xvjf /path/to/kdemodule-svn.tar.bz2 cd kdemodule svn revert -R . # This step restores the missing files. svn up # This step updates the source to the latest code, and is optional.
Extra Tidbits
That's it! You've got a valid KDE module checkout now. Some things to keep in mind:
- Each module snapshot contains a special README.svn-nightly file containing information on how to use the snapshot. You've already performed the svn revert and update steps.
- The modules are already setup to update from the KDE anonymous Subversion repository (svn://anonsvn.kde.org/). If this is not correct for you (i.e. you're a developer), then you can use the svn switch command to fix the checkout as described in the README.svn-nightly file.
- Switch to the module source directory (cs <moduleName>)
- If you use Subversion over SSH, run svn switch --relocate svn://anonsvn.kde.org svn+ssh://<user>@svn.kde.org
- If you use Subversion over HTTPS, run svn switch --relocate svn://anonsvn.kde.org https://<user>@svn.kde.org
- (The way this works is that svn switch --relocate rewrites the Subversion metadata in the module, replacing the first substring (svn://anonsvn.kde.org) in the repository URL with the second substring (svn+ssh: or https:). This is done locally without any contact to the repository required.
- If you want to keep the module up to date in the future, just run svn up as you would for any other Subversion checkout. You do not have to continue downloading snapshots just to update the module, and to do so would be inefficient and slow.