Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Tips for acessing tikiwiki's SVN (Subversion) repository (Cached)
Refresh Print

SVNTips

The migration of our CVS repository to the SVN (Subversion) repository is done!

View source code:
http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk (external link)

For descriptions about each branch, please see: Where to commit for more information.



Switching from 1.10

If you are still on the old 1.10 branch, now is the time to switch using one of the following commands:
svn switch https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk

svn switch https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/2.0

The release candidate
svn switch https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/3.0


Branch 1.9 remains in CVS. There are no plans to migrate 1.9 away from CVS.

Technical information

The new SVN repository URL, for development branch (i.e. trunk) is :
https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk


The current stable branch (i.e. 4) to have the latest 4.x is :
https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/4.x


First, the reference documentation for subversion:
http://svnbook.red-bean.com/ (external link)

If you are wondering about what branch to commit it: see Where to commit.

Basic SVN usage

Below are basic command lines to know. If you were using GUI like TortoiseCVS, just download TortoiseSVN instead ;)

Commands available to anyone on the internet

  • To checkout the 3.0 branch (creates a local SVN repository in your current directory including all the code):
svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/3.0

  • To checkout the 4.x branch (creates a local SVN repository in your current directory including all the code):
svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/4.x

  • To checkout the development trunk (creates a local SVN repository in your current directory including all the code):
svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk


  • To build a new 2.x tiki (all code without SVN specific files)
svn export https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/2.0 DEST_DIRECTORY


  • To update a checkout (caution: current version of trunk is experimental)
cd checkout_directory
svn update


  • To update/rollback an installation to a different revision (ahead or back)
svn update -r1234


  • To update faster (in development, not production environments)
cd checkout_directory
svn up --ignore-externals


  • To see what will be committed
cd checkout_directory
svn status
svn diff


  • To list the content of 2.0 branch on the server:
svn ls https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/2.0

  • To list the content of development trunk on the server:
svn ls https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk

Commands for TikiWiki developers

  • To commit something inside a checkout
Committing requires a SourceForge login/password. Also, a TikiWiki admin needs to give you Write permissions.
cd checkout_directory
svn commit

Please commit with an inline message:
svn commit -m "[FIX] short fix description...."

Your first commit may require your sourceforge login/password
svn commit --username yourlogin -m "[FIX] short fix description...."


  • To see the log of commit messages
cd checkout_directory
svn update #this is to be sure to have the last log entries
svn log

or page by page
svn log |less


View one commit's changes
svn diff -r1234:1235

Rollback one version
svn merge -r1235:1234
svn ci

View single log entry
svn log -r1234


  • Adding a file to the repository
Add a file
cd checkout_directory
svn add new_file
svn commit -m "[ADD] feature: new file added in order to ....."


Please take care about the svn properties of the files that you add.
  • php, inc, tpl, js, css files should have only one svn property: svn:keywords whose value is "Id" (without double-quotes). Please, see this page (external link). You can add, in the header of these files a commented line
// $Id$

Once committed, this will expand and indicate the last commit on that file
  • png, jpg, all image files : svn:mime-type ==> application/octet-stream. For those files, this prop is automatically added by the server when you commit

Useful tips

Those commands are faster if you use them on one precise directory or file
(e.g. svn log tiki-index.php ; svn diff lib/ ; ...)

Your SourceForge login/password will not be necessary until you commit something.
This means that anonymous and developer access are the same... This is very nice :-)

Note that if you have a message like this one when trying to commit, it means that your password has expired and you need to login through SourceForge's web interface to change it. SourceForge will allow you to login and will not tell you the password is expired. Change it anyway.
svn: Commit failed (details follow): 
svn: MKACTIVITY  of '/svnroot/tikiwiki/!svn/act/eac4ef53-cc7f-4415-ae1e-da1bac94a2ce': 
 authorization failed (https://tikiwiki.svn.sourceforge.net)



Windows SVN Usage

Just because you don't know a grep (external link) from man page (external link), doesn't mean you cannot contribute code. This section includes information for Windows users who prefer a GUI instead of a command line.

Close
note Note
Also see Commit for step-by-step instructions on how to commit code using Windows.


Getting set up.

  1. Get a Tikiwiki and Sourceforge account, then get SVN commit access.
  2. Download and install a SVN client, such as TortoiseSVN (external link), that you will use to checkin/out files.
  3. Download and install an editor, such as Notepad++ (external link) or PHP Designer (external link), that you will use to edit the TPL and PHP files.
    Note: When using your editor, whether you use a simple program like Notepad++ or something proprietary like Dreamweaver, you must make sure that you save your edited files with Unix-style line breaks ie just LF instead of the CR + LF that Windows would normally use.

Checking out the code.

  1. Download the Tiki source code to your PC.
  2. Create an empty directory.
  3. Right-click in the directory and select SVN Checkout from the popup menu.
  4. In the Checkout dialog, enter the following:
  5. Click OK. TortoiseSVN will download all the files to your local folder.

Checking in files.

  1. Right-click a file that you udpated, and select SVN Commit from the pop-up menu.
  2. In the Enter Log Message dialog, enter the following:
    • Message: Enter a descriptive synopsis of your edits.
    • File: Select the file to check in.
      If you right-clicked a single file, only that file will be shown. If you right-clicked a folder, all files within that folder (and its sub-folders) that you have edited will be shown.
  3. Click OK. TortoiseSVN will upload the file and commit it to the SVN repository.

Updating files.

  1. Right-click a blank-area in your local folder, and select SVN Update from the pop-up menu.
  2. TortoiseSVN will compare the files in your local folder with those in the SVN repository, and download the newer version, if available.



About the repository directories structure


Subversion is usually structured a bit differently (but better from my point of view) compared to CVS. There is generally three directories at the root level:
  • trunk/ => this is the development version (future 6.x at this date), where most of development is done. New functionalities are added here,
  • proposals/X.x (eg. proposals_3.x) => this is where you can propose some code for the next stable branche release (e.g. in order to backport fixes from trunk). The Quality Team will check your commit and, if accepted, backport your code to the stable branch (if still maintained),
  • branches/X.x (eg. branches/4.x) => stable branches repository. If not member of the Quality Team, you should not commit to this branches. Please read (Quality Team),
  • branches/experimental => repository for some experimental work before merging with trunk (once almost cleaned),
  • tags/ => this is where we store a "snapshot" of each release. There should be no code modifications here.

We will have those "standard" directories + some others. There will be at least two additional directories:
- third_party/ => this contains one subfolder per third party library that is used by tiki but should not be modified (except to update it).
- mods/ => this contains the code of tiki mods, available on mods.tikiwiki.org

So, this means that we will now have this directory structure inside our repository:
tikiwiki/
  trunk/
  branches/
    1.10/
    2.0/
    3.0/
    4.x/
    experimental/
      workspaces/
      webdav/
        .
        .
    proposals/
      3.x/
      4.x/
  tags/
    1.10.0b/
    2.0/
     .
    3.0
     .
  mods/
    trunk/
    branches/
      2.0/
  third_party/
    adodb/
    fckeditor/
    jscalendar/
    phplayers/
    smarty/


This means, for those who want to work on mods, that they will have to checkout the mods directory this way:
https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/mods/trunk


Restore a deleted file

  1. Merge back specific commit from trunk
    If you deleted a file in revision 19139
    svn merge -r19138:19139 https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk

  2. Commit file
    Add details to explain why, and use right file name
    svn commit -m "[FIX] Restoring file" filename.php


Restore in trunk a file deleted in a branch

  1. Merge back specific commit from branches/4.0
    If you deleted a file in revision 19139
    svn merge -r19138:19139 https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/4.0

  2. Commit file
    Add details to explain why, and use right file name
    svn commit -m "[FIX] Restoring file" filename.php


Proposing a commit to another branch


Handling branches


Experimental branches

As of the release of 2.0, releases will be made more often. In order to do so, trunk must remain somewhat stable. To make major changes, experimental branches can be used.

To work from an experimental branch:
  1. Check-out trunk
  2. Create your branch as follows:
    1. Open a shell window.
    2. Position yourself at the root of the place where you checked out trunk.
    3. do `php doc/devtools/svnbranch.php (external link) branches/experimental/your_subproject_name`
    • Example: php doc/devtools/svnbranch.php branches/experimental/plugin_ui
  3. Check-out your new branch
  4. Develop and commit in your branch
Close
Tip Tip
Tip: Frequently (at least once a week is recommended) update from latest trunk code using `php doc/devtools/svnbranchupdate.php trunk`.
Fix conflicts and commit using `svn commit -F svn-commit.tmp`.


  1. When done and ready to merge, update one last time from latest trunk code
  2. From the trunk check-out, run `php doc/devtools/svnmerge.php branches/experimental/your_subproject_name`
  3. Commit changes with a meaningful message.

All scripts provide you with the next steps for each of them. Follow those steps carefully.

Update from Stable branches

  1. Check-out trunk
  2. Run `php doc/devtools/svnbranchupdate.php branches/version_number`
    • Example: php doc/devtools/svnbranchupdate.php branches/5.x
  3. Fix conflicts and commit using `svn commit -F svn-commit.tmp`.

Removing an experimental branch

Example of removing an experimental branch
svn remove -m "[KIL] Lesser magic was merged long ago" http://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/experimental/lesser-magic/



Notes from 4.x/5.x release processes

[+]

TODO

As you can see, I didn't create some directories yet:

  • mods/branches/ : this is because we never had branches for mod before, so no urgency.

Another important thing: Do NOT touch libs of third_party, neither in third_party directory, nor in branches/x.x/lib/ or trunk/lib/ ... the two last ones are "specials" because they use svn capabilities (svn:externals property) to point to those in third_party directory. It's like links. They are there just to make it easier to have a running tiki with all needed libs from a checkout of trunk or a branch.



Contributors to this page: ricks991000 points  , lindon440 points  , alain_desilets1798 points  , Chealer9677 points  , jonnybradley1038 points  , eromneg333 points  , pkdille611 points  , sylvie2406 points  , mlpvolt191 points  , lphuberdeau1025 points  , koth1590 points  , marclaporte31730 points  , Jyhem359 points  and gmartin85 points  .
Page last modified on Friday 12 March, 2010 13:05:13 UTC by ricks991000 points .

SourceHistory

Main Menu [toggle]


Bugs and Wishes
  1. Report a Bug (or suggest a feature enhancement)

  2. Search Bugs

  3. List yours



About Development

Mailing lists

Extra Stuff

Teams

External Links

Full list of Wiki Pages

TikiWiki on Social Networks


To register [toggle]

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

Search a Wiki Page [toggle]

Exact match

Search Tracker Items Subject [toggle]

Keywords [toggle]

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI – 508)
Action log 2.x
Administration
Ajax 2.x
Alert 3.x
Articles & Submissions
Backlinks
Banner
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Group Home Page)
Database independence
Database MySQL
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Group
Help System
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
jQuery
Karma
Live Support
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tag
Missing features
MindMap 3.x
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Payment 5.x
Performance Speed / Load / Compression / Cache
Permission
Poll
Profile Manager
Quiz
Rating
RSS
Score
Search engine optimization (SEO)
Search
Security
Semantic links 3.x
Shoutbox
Site Identity
Slideshow
Smarty Template
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Toolbar (Quicktags)
Trackers
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace Ideas 4.x
WYSIWTSN 4.x
WYSIWYCA
WYSIWYG 2.x
XMLRPC

Last Comments [toggle]

  1. Working on it !
  2. Hack attached doesn´t work
  3. Possible reason and solution
  4. Another URL