1 / 39

Progress with migration to SVN

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,

milton
Download Presentation

Progress with migration to SVN

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. The Geant4 repository layout - remind 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.

  4. Developer View

  5. The architecture – what developer should be aware of

  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.

  7. g4svn g4svn [SUBCOMMAND] [OPTIONS] ARG • 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,

  8. g4svn checkout (co) g4svn checkout [OPTIONS] ARG • 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.

  9. g4svn vs. svn - checkout (co) g4svn checkout geant4-09-03-ref-07 Linux/Mac: svn checkout \ svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/_symbols/geant4-09-03-ref-07 geant4 Windows: svn checkout \ https://svn.cern.ch/reps/g4test/tags/geant4/_symbols/geant4-09-03-ref-07 geant4

  10. g4svn checkout - examples g4svn checkout list • 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 –-co-branch –-dir-name=BRANCH-XXX XXX g4svn checkout trunk

  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”

  12. g4svn tag g4svn tag [OPTIONS] ARG • ARG isthename 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.

  13. g4svn vs. svn - tag Examples for the event category (geant4/source/event) 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” 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”

  14. g4svn tag - examples g4svn tag tag-name-VXX-YY-ZZ • Simple tag: • Tag proposed without a bugfix: • Tag proposed with a bugfix: • Tag proposed fixing a bug number: 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

  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

  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.

  17. g4svn switch g4svn switch [OPTIONS] ARG • 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.

  18. g4svn vs. svn - switch (sw) Examples for the event category (geant4/source/event) g4svn switch event-VXX-YY-ZZ svn switch svn+ssh://svn.cern.ch/reps/g4test/tags/geant4/source/event/_symbols/event-VXX-YY-ZZ . g4svn switch trunk svn switch svn+ssh://svn.cern.ch/reps/g4test/trunk/geant4/source/event

  19. g4svn switch - examples g4svn switch list • 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 trunk g4svn switch tag-name g4svn switch –-branch branch-name

  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.

  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

  22. Working on a category (1/3) g4svn checkout geant4-09-03-07 cd geant4/source/event • Checkout the reference tag: • Switch category to the trunk: • Make some changes • File changes, • Tree changes (svn add, remove, copy, rename, move) • Check changes (-u option : check against HEAD): • [GO TO POINT 3 OR 6] g4svn switch trunk svn status -u

  23. Working on a category (2/3) • Update – take other developers’ changes to Your working copy: • Commit • [GO TO POINT 3 OR 9] • Update whole category to the same revision: svn update svn commit –m „Commiting changes” svn update

  24. Working on a category (3/3) • Exclude some files or directories (i.e. test): • Tag: • Revert (recursive) the state of the category to the after-point 6 (svn update) • [GO TO POINT 3] svn rm test svn rm some_other_file g4svn tag event-VXX-YY-ZZ svn revert . -R

  25. Admin View

  26. The architecture

  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.

  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

  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

  30. Tag statuses

  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

  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.

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

  34. Development lines – testing

  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.

  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.

  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.

  38. Q&A

  39. Thank You

More Related