Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4."— Presentation transcript:

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

2 The Geant4 repository layout - remind 2 https://svnweb.cern.ch/cern/wsvn/g4test

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. 3

4 4

5 The architecture – what developer should be aware of 5

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. 6

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 7

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 8

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/g eant4-09-03-ref-07 geant4 Windows: Linux/Mac: 9

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 10

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): 11 svn copy. REPO_URL/tags/geant4/source/run/_symbols/run-V09-00-00 -m „Creating tag run-V09-00-00” svn copy. REPO_URL/tags/geant4/source/run/_symbols/run-V09-00-00 -m „Creating tag run-V09-00-00”

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 12

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” 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” 13

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 14

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 update svn remove file1 svn remove dir1 g4svn tag tag-name svn revert. -R svn commit –m „Before tagging commit” svn update svn remove file1 svn remove dir1 g4svn tag tag-name svn revert. -R 15

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. 16

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 17

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 18

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 19

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. 20

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/geant4tagshttps://sftweb.cern.ch/geant4/geant4tags 21

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 checkout geant4-09-03-07 cd geant4/source/event g4svn switch trunk svn status -u 22

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 23

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 svn rm test svn rm some_other_file g4svn tag event-VXX-YY-ZZ svn revert. -R 24

25 25

26 The architecture 26

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. 27

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 https://sftweb.cern.ch/geant4/geant4tagsadmin 28

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 29

30 Tag statuses 30

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 31

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. 32

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. 33

34 Development lines – testing 34

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. 35

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. 36

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. 37

38 38

39 39


Download ppt "Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4."

Similar presentations


Ads by Google