39
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4

Progress with migration to SVN

  • Upload
    milton

  • View
    48

  • Download
    0

Embed Size (px)

DESCRIPTION

Geant4. Progress with migration to SVN. Part3: How to work with g4svn and geant4tags tools. The Geant4 repository layout - remind. https://svnweb.cern.ch/cern/wsvn/g4test. What do We need for switching to SVN?. SVN repository adapted to Geant4 development cycle, - PowerPoint PPT Presentation

Citation preview

Page 1: Progress  with  migration to SVN

Progress with migration to SVN

Part3: How to work with g4svn and geant4tags tools.

Geant4

Page 2: Progress  with  migration to SVN

2

The Geant4 repository layout - remind

https://svnweb.cern.ch/cern/wsvn/g4test

Page 3: Progress  with  migration to SVN

3

What do We need for switching to SVN?• SVN repository adapted to Geant4 development

cycle,▫Convenient and manageable directory layout,▫Sticky tags,▫Validation.

• Tags collection,• Web interface to manage the tags,• Documentation,• Adapt other procedures and scripts,

▫Testing,▫Release building,

Creating the release tag, Running tests.

Page 4: Progress  with  migration to SVN

4

Developer View

Page 5: Progress  with  migration to SVN

5

The architecture – what developer should be aware of

Page 6: Progress  with  migration to SVN

6

pre-commit hook•It is a program invoked by SVN on the server -

just before the moment of committing changes,•Usually it invokes other programs, that SVN

admin can provide,•These programs can be written in any

programming language,•Geant4 SVN repository pre-commit hook:

▫Implements sticky tags,▫Checks if before tagging changes were

committed to the trunk,▫Stores tag information in the geant4tags web

application database.

Page 7: Progress  with  migration to SVN

7

g4svn

•Created to help with complicated svn operations,

•Has the following subcommands:▫checkout,▫switch,▫tag,▫ branch,▫ merge.

•It is a Python script,▫It is platform independent and the only

requirement is to have Python version >2.4 but not Python 3,

g4svn [SUBCOMMAND] [OPTIONS] ARG

Page 8: Progress  with  migration to SVN

8

g4svn checkout (co)

•ARG can be:▫list – prints out the list of available tags or

branches of the top level Geant4 directory,▫trunk,▫tag name,▫branch name.

•Options:▫--dir-name – checkout destination directory –

by default it is ‘geant4’,▫--co-branch – flag informing g4svn to checkout

a branch.

g4svn checkout [OPTIONS] ARG

Page 9: Progress  with  migration to SVN

9

g4svn vs. svn - checkout (co) g4svn checkout geant4-09-03-ref-07

svn checkout \ svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/_symbols/geant4-09-03-ref-07 geant4

svn checkout \ https://svn.cern.ch/reps/g4test/tags/geant4/_symbols/geant4-09-03-ref-07 geant4

Windows:

Linux/Mac:

Page 10: Progress  with  migration to SVN

10

g4svn checkout - examples• List available options:

• Checkout tag geant4-09-03-07 to the geant4 directory:

• Checkout branch XXX to the BRANCH-XXX directory:

• Checkout the trunk to the geant4 directory :

g4svn checkout geant4-09-03-07

g4svn checkout list

g4svn checkout –-co-branch –-dir-name=BRANCH-XXX XXX

g4svn checkout trunk

Page 11: Progress  with  migration to SVN

11

Tagging in SVN - remind•Tagging is copying in SVN,•In Geant4 - copying to corresponding

subdirectory of the tags directory,•For example tag on run (supposing that we

are in geant4/source/run):svn copy . REPO_URL/tags/geant4/source/run/_symbols/run-V09-00-00-m „Creating tag run-V09-00-00”

Page 12: Progress  with  migration to SVN

12

g4svn tag

•ARG is the name of a tag,•Options:

▫-p (--proposed) – indicates immediate proposing a tag on the geant4tags web application,

▫-d (--description) – required if a tag proposed – the description for the proposed tag,

▫-b (--bugfix) – flag indicating g4svn that this tag includes bugfix,

▫--bugfix-number – flag indicating g4svn that tag resolve problem with a provided number.

g4svn tag [OPTIONS] ARG

Page 13: Progress  with  migration to SVN

13

g4svn vs. svn - tag

g4svn tag event-VXX-YY-ZZ

svn copy . \ svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/source/event/_symbols/event-VXX-YY-ZZ –m „This tag was manufactured by g4svn to create tag event-VXX-YY-ZZ”

Examples for the event category (geant4/source/event)

g4svn tag –p –d „Tagging event” event-VXX-YY-ZZ

svn propset proposed yes .svn propset bugfix no .svn copy . \ svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/source/event/_symbols/event-VXX-YY-ZZ –m „Tagging event”

Page 14: Progress  with  migration to SVN

14

g4svn tag - examples• Simple tag:

• Tag proposed without a bugfix:

• Tag proposed with a bugfix:

• Tag proposed fixing a bug number:

g4svn tag tag-name-VXX-YY-ZZ

g4svn tag –p –d „Tag without bugfix” tag-name-VXX-YY-ZZ

g4svn tag –p –b –d „Tag with bugfix” tag-name-VXX-YY-ZZ

g4svn tag –p –-bugfix-number=666 –d „Tag fixing problem 666” tag-name-VXX-YY-ZZ

Page 15: Progress  with  migration to SVN

15

Selective tagging•g4svn copies the current working directory

contents to the tag,•If You want to tag only a part of the

directory, You have to svn remove what You want to exclude:

•The last command reverts the working directory to the point after svn update.

svn commit –m „Before tagging commit”svn updatesvn remove file1svn remove dir1g4svn tag tag-namesvn revert . -R

Page 16: Progress  with  migration to SVN

16

svn switch - remind• Every file/directory in Your working copy ‘points’ to

some file/directory in the repository,• svn switch command allows You to point to

different file/directory that shares a common ancestor, although not necessarily.

Page 17: Progress  with  migration to SVN

17

g4svn switch

•ARG can be:▫list – prints out the list of available tags or

branches for the working directory,▫trunk,▫tag name,▫branch name.

•Options:▫--tag – Default, switches to the tag with the

given name,▫--branch – switches to the branch with the given

name.

g4svn switch [OPTIONS] ARG

Page 18: Progress  with  migration to SVN

18

g4svn vs. svn - switch (sw)

g4svn switch event-VXX-YY-ZZ

svn switch svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/source/event/_symbols/event-VXX-YY-ZZ .

Examples for the event category (geant4/source/event)

g4svn switch trunk

svn switch svn+ssh://svn.cern.ch/reps/g4test/trunk/geant4/source/event

Page 19: Progress  with  migration to SVN

19

g4svn switch - examples• List available switch options for the category:

• Switch the category to the trunk:

• Switch the category to a specific tag:

• Switch the category to a specific branch:

g4svn switch list

g4svn switch tag-name

g4svn switch –-branch branch-name

g4svn switch trunk

Page 20: Progress  with  migration to SVN

20

geant4tags•It is a web application replacing bonsai,•Implemented using modern technologies,•Two versions:

▫Developer – easy to understand interface,▫Admin – full functionality.

•This way, developers use only functions that they really need – not confusing interface,

•The admin version gives some more functionality than the current system.

Page 21: Progress  with  migration to SVN

21

geant4tags – developer version• It offers easy to understand interface for the Geant4

developer providing the following functionality:▫ querying tags database,▫ proposing a tag with additional information:

Description, Bugfix - with an optional number.

▫ Rejecting the proposed tag providing: Sentence.

• Has some convenient features:▫ Multiselecting tags,▫ Sorting the table.

• Accessible only to the authorized users,• Available at: https://sftweb.cern.ch/geant4/geant4tags

Page 22: Progress  with  migration to SVN

22

Working on a category (1/3)1. Checkout the reference tag:

2. Switch category to the trunk:

3. Make some changes▫ File changes,▫ Tree changes (svn add, remove, copy, rename,

move)4. Check changes (-u option : check against HEAD):

5. [GO TO POINT 3 OR 6]

g4svn checkout geant4-09-03-07 cd geant4/source/event

g4svn switch trunk

svn status -u

Page 23: Progress  with  migration to SVN

23

Working on a category (2/3)6. Update – take other developers’ changes

to Your working copy:

7. Commit

8. [GO TO POINT 3 OR 9]9. Update whole category to the same

revision:

svn update

svn commit –m „Commiting changes”

svn update

Page 24: Progress  with  migration to SVN

24

Working on a category (3/3)10.Exclude some files or directories (i.e.

test):

11.Tag:

12.Revert (recursive) the state of the category to the after-point 6 (svn update)

13.[GO TO POINT 3]

svn rm test svn rm some_other_file

g4svn tag event-VXX-YY-ZZ

svn revert . -R

Page 25: Progress  with  migration to SVN

25

Admin View

Page 26: Progress  with  migration to SVN

26

The architecture

Page 27: Progress  with  migration to SVN

27

Testing procedure• Developers create tags - information about them

is stored in the database,• Some of them are being selected and added to

the pool of tags that will be tested on the top of the last global tag,

• Every night, system called Nightly Build System builds a Geant4 version with selected tags,▫List of the tags is generated by Bonsai.

• This version is being tested and information about failures and errors is being preserved,

• After analyzing this information, some tags are accepted and some are rejected.

Page 28: Progress  with  migration to SVN

28

geant4tagsadmin• More advanced version of the geant4tags – more

functions,• Its main goal is to support Geant4 development:

▫Manage tags,▫Select tags for testing,▫Manage concurrent ‘development lines’,▫Keep the history of the development.▫Inform developers (by e-mail) about certain actions:

Tag accepted, Tag rejected, Maybe other?

• Accessible only to the authorized users,• Available at:

https://sftweb.cern.ch/geant4/geant4tagsadmin

Page 29: Progress  with  migration to SVN

29

The main concepts - Tag• Represents a tag created by a developer,• Main attributes:

▫Name▫Tagged path,▫Creation date,▫Description▫Status:

Internal, Proposed, Selected, Postponed, Accepted, Rejected, GLOBAL

Page 30: Progress  with  migration to SVN

30

Tag statuses

Page 31: Progress  with  migration to SVN

31

The main concepts - Taglist•Taglist it is a labeled

collection of some tags,•Its purpose is to hold

some common information about a set of tags,

•Main attributes:▫Number,▫(Optional) Name,▫Creation date,▫Linkage to the

Development line

Page 32: Progress  with  migration to SVN

32

The main concepts – Development line• Represents some development

time interval – from one global tag to another,

• Consists of a global tag and taglists,

• Concurrent development lines,• Main attributes:

▫ Name,▫ Linkage to global tag,▫ Slot,▫ Status (Open, Closed),▫ Open date,▫ Close date,▫ Linkage to the previous

development line,▫ Description.

Page 33: Progress  with  migration to SVN

33

Development line - testing• Each development line has attribute slot,• Its purpose is to identify the ‘family’ of the

development lines,• This attribute is used to select development lines

by the Nightly Build System,• Concurrent development lines must have different

slots – there can be only one open development line on some slot,

• The main goal was to enable parallel testing of the different configuration of the Geant4 project▫Main line,▫Patches,▫Other.

Page 34: Progress  with  migration to SVN

34

Development lines – testing

Page 35: Progress  with  migration to SVN

35

geant4tags admin – tag functionality•Querying tags,•Filtering received data,•Multiple operations on tags:

▫Changing the status of tags,▫Assign tags to the taglists,▫Unassign tags from the taglists.

•Assigning the global tag to the development line.

Page 36: Progress  with  migration to SVN

36

geant4tagsadmin – taglist, development lines functionality

•Taglists:▫Creating taglists,▫Inheriting taglists by development lines,▫Assigning taglists to development lines,

•Development lines:▫Creating,▫Updating (including closing),▫Analyzing assigned taglists with tags.

Page 37: Progress  with  migration to SVN

37

Conclusion•SVN is a little bit different from CVS,•Some commands remain the same, some

are different,•g4svn will allow Geant4 developers to

‘smoothly’ change working model from CVS to SVN,

•Tagging and proposing are simpler now – single command,

•geant4tags - has two versions:▫Developer – easy to understand interface,▫Admin – gives full control over the

development cycle.

Page 38: Progress  with  migration to SVN

38

Q&A

Page 39: Progress  with  migration to SVN

39

Thank You