Professional Documents
Culture Documents
Wikis
Introduction ?...?
Access control?
File Server
Concurrent access?
Source
code files
Update conflicts?
Error handling?
Remote editing?
Versioning?
Web Server
___ Recovery of old versions?
___
Published ___ Easy usage?
Web
pages ___
___ ___ Deep know-how needed?
___ ___
___ Time-dependent publication?
?...? 2
Outline
3
Categories of Revision Control Systems
Local Version Centralized Version Decentralized Version
Control Control Systems Control Systems
Version 2
Version 3 Version 3
Version 1
Version 2 Version 2
Local Version
Database Version 1 Version 1
Version Database Version
Computer Database
Central Version Control
e.g. rcs Server Server
e.g. Concurrent Versions System e.g. Git 4
(CVS), Subversion (SVN)
CVS (Concurrent Versions System)
Repository and Sandbox /home/project
raw files
Repository CVS src1.php
/home/cvs/project1
client directory
CVSROOT
Initiator
module1
history files src2.php
CVS src1.php,v src3.jpg
server directory
src2.php,v Sandbox
src3.jpg,v /home/cvs/module1
revisions
CVS
CVS src1.php
client directory
CVS
src2.php
Repository:
src3.jpg
• Central storage for all raw files which are under RC
• Each raw file is converted to a history file (*,v) that contains recovery
information and the current revision
• Provides a “CVSROOT” directory containing additional meta-information
Sandbox: (a working directory containing specific checked-out revisions)
• A Sandbox is created by the “cvs checkout” command, thereby
specific revisions of raw files are created with the help of history files
• Every directory in a CVS-Sandbox has a “CVS” directory, which contains
management files providing e.g. information about current revision number
or checked-out time 5
CVS – Selected mechanisms
Sandbox
Versioning /home/cvs/module1
CVS
Repository
CVS src1.php {1.9}
/home/cvs/project1
CVSROOT
client directory
CVS
module1
revisions src2.php {1.3}
CVS src1.php,v {1.1-1.9} src3.jpg {1.7}
directory
server src2.php,v {1.1-1.13} Sandbox
src3.jpg,v {1.1-1.7} /home/cvs/module1
CVS
CVS src1.php {1.3}
client directory
CVS
src2.php {1.13}
src3.jpg {1.5}
• Merging is a mechanism for joining two different revisions of the same file
– Notice: If the same lines are edited a conflict occurs that has to be
solved by the developers manually
• The "cvs update" proofs whether new revisions exist in the 7
Repository and, if this is the case, tries to merge these different revisions
CVS – Selected mechanisms
Tagging
Tag: release_1_0
Locking
• CVS provides a way to set an explicit commit lock on a revision
• While the commit lock is active other users are not able to commit a
revision of the particular file 8
CVS – Selected mechanisms
Branching
Repository Sandboxes
-r1.1
cvs checkout
-r1.2 Label a branch (-b) on -r1.2 -r1.2
cvs tag –b branch1
Branch-Tag-Name
cvs update branch1
branch1
Write the label “branch1”
on the local revision -r1.2
EDIT
branch1
cvs commit
-r1.2.1.1 -r1.2
edited
cvs checkout
-r1.3 -r1.3
-j…joining
History file of a raw text file History file of a raw binary file
(incremental) (full data)
-r1.9: -r1.5:
1: if (i>5)
2: { current src3.jpg
3: echo "hallo Welt"; revision
4: } -r1.4:
-r1.8:
3: echo "hello world"; Recovery src3.jpg
information
10
SVN (Subversion System)
Repository
(Fairly Secure
Berkeley DB FSFS
File System) 11
SVN – Tags and Branches
Tagging Branching
[…]/svn/module1
module1 […]/svn/branches/bugfix1
Repository
src1.php
http://myhost.de/svn module1 … -r2 -r4 -r6 -r7
COPY
tag COPY
bugfix1 -r3 -r5
release_1_0
File A ∆1 ∆2 ∆3
File B ∆1 ∆2
File C ∆1 ∆2 ∆3
Git creates with every commit a new snapshot of the versioned files:
File Av1 File Av2 File Av2 File Av3 File Av3 File Av4
File Bv1 File Bv2 File Bv2 File Bv2 File Bv3 File Bv3 SHA1
hash of
File Cv1 File Cv1 File Cv2 File Cv2 File Cv3 File Cv4 concatenated
hashes of
versioned
files are used
Snapshot Snapshot Snapshot Snapshot Snapshot Snapshot as identifiers
Identifier 1 Identifier 2 Identifier 3 Identifier 4 Identifier 5 Identifier 6
13
Link to previous file: if files are not changed, a link to previous file is stored
File X
(increases efficency and reduces storage space)
Git - Branching
Every branch has a name.
• A branch in Git is a reference to a snapshot The main branch is named
“master“. One branch is
Result after 3 commits always the active one –
master head marked by the “head“
(chain of 3 snapshots):
reference.
78aafc 8aacf1 68bcfc
1 $git branch bugfix
Git command: creates a branch
(in local repository) with name “bugfix“
bugfix
bugfix head
master
bugfix head
4 $git checkout master Branch “master“ is activated and new changes
are committed to this branch
5 $git commit
master head
Result after commands:
ab11aa
78aafc 8aacf1 68bcfc
93aabc
bugfix
6 $git merge bugfix Git command: merge branch “bugfix“ into active branch
master head
Result after command:
ab11aa ac61ca
78aafc 8aacf1 68bcfc
93aabc
bugfix
15
Git – Remote branches
master head
(Remote) Canonical
ca672a ab11aa Project Repository Via the Git command “clone“, a
copy of a remote repository is
1 $git clone user@somedomain.com/repo.git
transferred to the local computer.
origin/master Local Repository Two branches are created: The
master branch and the branch
ca672a ab11aa origin/master are pointing to the
origin’s master branch.
master head
Integration
Manager has Fetches and merges with local copy
read access 3 3 3
17
Motivation: Manual Web publishing vs. CMS
Manual
Administrative effort
Using a Content
Management
System
Content volume
18
Content
<html><head><title>Test-page</title>
<style type="text/css"> Layout
Structure data h1 {text-align:center} </style>
Raw data
</head><h1>Picture</h1>
<img src="picture.jpg"/>
</body></html>
19
Content Lifecycle – CMS functionalities
Content Lifecycle
Creation Archiving
Authoring, Retrieval,
Authentication, Backup/Rollback,
Check-in / Check-out, Organisation Publishing Version management
WYSIWYG, User management, Presentation,
Multi-user ability Workflow/ Quality Personalisation,
protection, Multi-Channel-
Page integrity/ Link Output,
Portal function
management,
Log functionality
Creation phase: Deals with collection, creation and editing of the content
Organisation phase: Deals with quality check and clearing of the content for publication
Publication phase: Deals with publication of the content in intra- or internet
Archiving phase: After removing the content from the network, content can be stored in
the content repository for documentation purpose or future usage (advantage: 20
retrieval or rollback)
Features of a CMS
Search function/ Retrieval (full text or via meta information) Version management
Page integrity/ Link management Separation of structure, layout and raw data
22
TYPO3 - Separation of structure, layout and raw data
Raw data
elements
CSS
Layout TP File
Picture, Audio System
TP… Template
TS… TypoScript
23
TypoScript example Comment row (not interpreted)
# default page
page = PAGE
PAGE object builds a framework for page.10 = TEXT
embedding further content page.10.value = The TUD logo
page.10.wrap = <h1>|</h1>
Content Object Array is created page.20 = COA
and put to “position” 20 of the page page.20.wrap = <table border= "1" >|</table
page.20.10 = COA
page.20.10.wrap = <tr>|</tr>
COA is wrapped into HTML table
row elements page.20.10 {
10 = TEXT
10.value = 266 x 77
Abbreviatory syntax for assigning
10.wrap = <td>|</td>
values to positions
20 = IMAGE
20.file = fileadmin/user_upload/tu-logo.gif
After creating an image object a 20.wrap = <td><div>|</div></td>
file is associated with it }
25
MediaWiki
Create a new
section by
creating its
heading
Include an image
and assign
different
attributes to it
Include regular
HTML tags
27
Semantic Wikis
Centralized Organize
Systems CVS/SVN Content
Git Lifecycle
client software
Decentralized Web browser
System
Web-based
Git CMS ___
___
(e.g. TYPO3) ___
___
WebDAV HTTP ___
+ extension ___
29
References
Revision Control
CVS http://www.nongnu.org/cvs/
SVN http://subversion.apache.org/
Git http://git-scm.com/
Open Book
about Git http://progit.org/
Content Management
TYPO3 http://www.typo3.com/
MediaWiki http://www.mediawiki.org/wiki/MediaWiki
Semantic
MediaWiki http://semantic-mediawiki.org/wiki/Semantic_MediaWiki
30