Version Control Lab. de Bases de Dados e Aplicaes Web MIEIC, FEUP - - PowerPoint PPT Presentation

version control
SMART_READER_LITE
LIVE PREVIEW

Version Control Lab. de Bases de Dados e Aplicaes Web MIEIC, FEUP - - PowerPoint PPT Presentation

Version Control Lab. de Bases de Dados e Aplicaes Web MIEIC, FEUP 2010/11 Srgio Nunes Version Control Version control is about maintaining a history of revisions made to documents. Each revision is associated with a timestamp


slide-1
SLIDE 1

Version Control

  • Lab. de Bases de Dados e Aplicações Web

MIEIC, FEUP 2010/11

Sérgio Nunes

slide-2
SLIDE 2

Version Control

  • Version control is about maintaining a history of revisions

made to documents.

  • Each revision is associated with a timestamp and a user.

Revisions can be compared, restored and merged.

  • Usually available as standalone applications, but can also

be embedded in other software (e.g. Word).

  • Ability to "undo mistakes".
  • Essential for the organization of multi-developer projects.
slide-3
SLIDE 3

Version Control Systems

  • Version control systems can be: local only, client-

server or distributed.

  • Open-source systems: CVS (1990), Subversion

(2000), Mercurial (2005), Git (2005).

  • Proprietary systems: Microsoft

Visual SourceSafe (1994), Perforce (1995).

slide-4
SLIDE 4

Client-Server

Central Repository User A

Local Copy

User B

Local Copy

User C

Local Copy

slide-5
SLIDE 5

Typical Actions

checkout modify files commit update Central Repository

slide-6
SLIDE 6

Subversion

  • Apache Subversion is an open-source

client-server version control system. Often abbreviated as SVN.

  • Subversion clients are available for all major

platforms (UNIX, Windows). For Windows Tortoise is a popular client.

  • Subversion meta information is kept in each

directory within a .svn subdirectory.

slide-7
SLIDE 7
  • Create repository.
  • Get copy from repository.
  • Add new files to repository.
  • Commit changes to repository.
  • Update local copy.

Common Commands

svn import <folder> <repository address> svn checkout <repository address> svn add <file> svn commit svn update

slide-8
SLIDE 8

Conflicts

Central Repository checkout checkout edit file-1.txt edit file-1.txt commit commit

?

slide-9
SLIDE 9

LBAW Prototype

Obtain prototype archive exemplo-php.tgz: wget http://web.fe.up.pt/~ssn/2010/lbaw/docs/exemplo-php.tgz Uncompress archive: tar xvfz exemplo-php.tgz Import prototype to each group's SVN repository: svn import exemplo http://lbaw.fe.up.pt/svn/lbaw11gxx/exemplo-php -m "Import prototype" Select local development area (e.g. src or public_html): cd ~/public_html svn checkout http://lbaw.fe.up.pt/svn/lbaw11gxx/exemplo-php cd exemplo-php ... change files ... Commit changes to repository: svn commit -m "Config changed"

slide-10
SLIDE 10

Best Practices

  • Each team member has its own local copy.

Visible at http://gnomo.fe.up.pt/~<user login>.

  • Distribute and organize work between members.
  • Checkout final version to group's account.

Visible at http://gnomo.fe.up.pt/~lbaw11gxx.

slide-11
SLIDE 11

References

  • Version Control with Subversion

http://svnbook.red-bean.com

  • Apache Subversion

http://subversion.apache.org