Version Control Using Subversion 1 September 2020 OSU CSE 2 - - PowerPoint PPT Presentation

version control using subversion
SMART_READER_LITE
LIVE PREVIEW

Version Control Using Subversion 1 September 2020 OSU CSE 2 - - PowerPoint PPT Presentation

Version Control Using Subversion 1 September 2020 OSU CSE 2 Version Control In team projects, software engineers: Share and extend a common code base (and comply with standards, coding conventions, comment templates, ) Work


slide-1
SLIDE 1

Version Control Using Subversion

1 September 2020 OSU CSE 2

slide-2
SLIDE 2

Version Control

  • In team projects, software engineers:

– Share and extend a common code base (and comply with standards, coding conventions, comment templates, …) – Work concurrently with each other

  • Best practice is for a team to use a

version control system

– We will use one called Subversion, but

  • thers are essentially similar

1 September 2020 OSU CSE 3

slide-3
SLIDE 3

Version Control

  • In team projects, software engineers:

– Share and extend a common code base (and comply with standards, coding conventions, comment templates, …) – Work concurrently with each other

  • Best practice is for a team to use a

version control system

– We will use one called Subversion, but

  • thers are essentially similar

1 September 2020 OSU CSE 4

This is not limited to code! A version control system can handle non-code files as well, which makes it handy for other sorts of team projects, too.

slide-4
SLIDE 4

Key Idea: The Repository

  • A central repository keeps all files (in our

case, Java code) and a history of all modifications to them

– A new team member can check out their own private copy from the repository – Each member can update their own copy to reflect the latest changes in the repository – Each member can commit changes from their own private copy to the repository

1 September 2020 OSU CSE 5

slide-5
SLIDE 5

Workflow Model: An Example

1 September 2020 OSU CSE 6

Ayesha Matt repository commit commit update update

slide-6
SLIDE 6

How Work Gets Done

  • Repository holds master copy of all files

– Never edited directly – Stores complete history, too!

  • Each team member has a local copy (or

working copy) in their own workspace

– All file creation, editing, deletion occurs here

  • Update and commit commands are used

to synchronize local and master copies

1 September 2020 OSU CSE 7

slide-7
SLIDE 7

The “Optimistic” Model

  • Any team member can modify their local

copy of any file at any time

– No “locking” or other synchronization among team members takes place on local copies

  • On an update, the latest version from the

repository often can be merged automatically into the local copy

– This is especially so when team members edit different files, so conflicts are rare

1 September 2020 OSU CSE 8

slide-8
SLIDE 8

Some Things That Can Happen

1 September 2020 OSU CSE 9

update commit Matt Ayesha repository

slide-9
SLIDE 9

Some Things That Can Happen

1 September 2020 OSU CSE 10

update commit Matt Ayesha repository Matt does an update to get the latest version to work on.

slide-10
SLIDE 10

Some Things That Can Happen

1 September 2020 OSU CSE 11

update commit Matt Ayesha repository Ayesha does an update to get the latest version to work on.

slide-11
SLIDE 11

Some Things That Can Happen

1 September 2020 OSU CSE 12

update commit Matt Ayesha repository Matt does a commit to put his latest edits into the repository.

slide-12
SLIDE 12

Some Things That Can Happen

1 September 2020 OSU CSE 13

update commit Matt Ayesha repository Ayesha does an update to get the latest version before she commits.

slide-13
SLIDE 13

Some Things That Can Happen

1 September 2020 OSU CSE 14

update commit Matt Ayesha repository The latest revision in the repository is merged into Ayesha’s copy.

Merge

slide-14
SLIDE 14

Some Things That Can Happen

1 September 2020 OSU CSE 15

update commit Matt Ayesha repository Suppose this merge is successful; then Ayesha commits.

Merge

slide-15
SLIDE 15

Some Things That Can Happen

1 September 2020 OSU CSE 16

update commit Matt Ayesha repository Matt tries to commit more changes, but has not updated recently.

Merge

slide-16
SLIDE 16

Some Things That Can Happen

1 September 2020 OSU CSE 17

update commit Matt Ayesha repository Ayesha has committed recently, and Matt may not do so now.

Merge Error: working version

  • ut-of-date
slide-17
SLIDE 17

Some Things That Can Happen

1 September 2020 OSU CSE 18

update commit Matt Ayesha repository Matt needs to update first.

Merge Error: working version

  • ut-of-date
slide-18
SLIDE 18

Some Things That Can Happen

1 September 2020 OSU CSE 19

update commit Matt Ayesha repository Suppose this merge has conflicts; then Matt must resolve them.

Merge Error: working version

  • ut-of-date

Conflict: requires attention

slide-19
SLIDE 19

Some Things That Can Happen

1 September 2020 OSU CSE 20

update commit Matt Ayesha repository After Matt resolves conflicts, he can continue and commit his changes.

Merge Error: working version

  • ut-of-date

Conflict: requires attention

slide-20
SLIDE 20

Some Things That Can Happen

1 September 2020 OSU CSE 21

update commit Matt Ayesha repository

Merge Error: working version

  • ut-of-date

Conflict: requires attention Meanwhile, Ayesha updates and continues with the latest version.