README_REPOSITORY
changeset 51502 ed5d96d01b2f
parent 51072 0351cc781a26
child 51597 c916828edc92
equal deleted inserted replaced
51501:fce7243c5e77 51502:ed5d96d01b2f
    20 
    20 
    21     ./bin/isabelle components -a
    21     ./bin/isabelle components -a
    22 
    22 
    23     ./bin/isabelle jedit -l HOL
    23     ./bin/isabelle jedit -l HOL
    24 
    24 
       
    25     ./bin/isabelle build -b HOL  #optional: build session image manually
       
    26 
    25 3. Update repository (bash shell commands):
    27 3. Update repository (bash shell commands):
    26 
    28 
    27     cd isabelle
    29     cd isabelle
    28 
    30 
    29     hg pull -u
    31     hg pull -u
    30 
    32 
    31     ./bin/isabelle components -a
    33     ./bin/isabelle components -a
    32 
    34 
    33     ./bin/isabelle jedit -l HOL
    35     ./bin/isabelle jedit -l HOL
       
    36 
       
    37     ./bin/isabelle jedit -b -f  #optional: force fresh build of Isabelle/Scala
       
    38 
       
    39 4. Access documentation (bash shell commands):
       
    40 
       
    41     ./bin/isabelle build_doc -p -a
       
    42 
       
    43     ./bin/isabelle doc system
    34 
    44 
    35 
    45 
    36 Introduction
    46 Introduction
    37 ------------
    47 ------------
    38 
    48 
    48 are shared with others.  This additional power demands some additional
    58 are shared with others.  This additional power demands some additional
    49 responsibility to maintain a certain development process that fits to
    59 responsibility to maintain a certain development process that fits to
    50 a particular project.
    60 a particular project.
    51 
    61 
    52 Regular Mercurial operations are strictly monotonic, where changeset
    62 Regular Mercurial operations are strictly monotonic, where changeset
    53 transactions are only added, but never deleted.  There are special
    63 transactions are only added, but never deleted or mutated.  There are
    54 tools to manipulate repositories via non-monotonic actions (such as
    64 special tools to manipulate repositories via non-monotonic actions
    55 "rollback" or "strip"), but recovering from gross mistakes that have
    65 (such as "rollback" or "strip"), but recovering from gross mistakes
    56 escaped into the public can be hard and embarrassing.  It is much
    66 that have escaped into the public can be hard and embarrassing.  It is
    57 easier to inspect and amend changesets routinely before pushing.
    67 much easier to inspect and amend changesets routinely before pushing.
    58 
    68 
    59 The effect of the critical "pull" / "push" operations can be tested in
    69 The effect of the critical "pull" / "push" operations can be tested in
    60 a dry run via "incoming" / "outgoing".  The "fetch" extension includes
    70 a dry run via "incoming" / "outgoing".  The "fetch" extension includes
    61 useful sanity checks beyond raw "pull" / "update" / "merge".  Most
    71 useful sanity checks beyond raw "pull" / "update" / "merge", although
    62 other operations are local to the user's repository clone.  This gives
    72 it has lost popularity in recent years.  Most other operations are
    63 some freedom for experimentation without affecting anybody else.
    73 local to the user's repository clone.  This gives some freedom for
       
    74 experimentation without affecting anybody else.
    64 
    75 
    65 Mercurial provides nice web presentation of incoming changes with a
    76 Mercurial provides nice web presentation of incoming changes with a
    66 digest of log entries; this also includes RSS/Atom news feeds.  There
    77 digest of log entries; this also includes RSS/Atom news feeds.  There
    67 are add-on history browsers such as "hg view" and TortoiseHg.  Unlike
    78 are add-on history browsers such as "hg view" and TortoiseHg.  Unlike
    68 the default web view, some of these tools help to inspect the semantic
    79 the default web view, some of these tools help to inspect the semantic
    70 
    81 
    71 
    82 
    72 Initial configuration
    83 Initial configuration
    73 ---------------------
    84 ---------------------
    74 
    85 
    75 The official Isabelle repository can be cloned like this:
    86 The main Isabelle repository can be cloned like this:
    76 
    87 
    77   hg clone http://isabelle.in.tum.de/repos/isabelle
    88   hg clone http://isabelle.in.tum.de/repos/isabelle
    78 
    89 
    79 This will create a local directory "isabelle", unless an alternative
    90 This will create a local directory "isabelle", unless an alternative
    80 name is specified.  The full repository meta-data and history of
    91 name is specified.  The full repository meta-data and history of
   123 mail to someone with write access to that file space.  It is also
   134 mail to someone with write access to that file space.  It is also
   124 quite easy to publish changed clones again on the web, using the
   135 quite easy to publish changed clones again on the web, using the
   125 ad-hoc command "hg serve -v", or the hgweb.cgi or hgwebdir.cgi scripts
   136 ad-hoc command "hg serve -v", or the hgweb.cgi or hgwebdir.cgi scripts
   126 that are included in the Mercurial distribution, and send a "pull
   137 that are included in the Mercurial distribution, and send a "pull
   127 request" to someone else.  There are also public hosting services for
   138 request" to someone else.  There are also public hosting services for
   128 Mercurial repositories.
   139 Mercurial repositories, notably Bitbucket.
   129 
   140 
   130 The downstream/upstream mode of operation is quite common in the
   141 The downstream/upstream mode of operation is quite common in the
   131 distributed version control community, and works well for occasional
   142 distributed version control community, and works well for occasional
   132 changes produced by anybody out there.  Of course, upstream
   143 changes produced by anybody out there.  Of course, upstream
   133 maintainers need to review and moderate changes being proposed, before
   144 maintainers need to review and moderate changes being proposed, before
   134 pushing anything onto the official Isabelle repository at TUM.  Direct
   145 pushing anything onto the official Isabelle repository at TUM.  Direct
   135 pushes are also reviewed routinely in a post-hoc fashion; everybody
   146 pushes are also reviewed routinely in a post-hoc fashion; everybody
   136 hooked on the main repository is called to keep an eye on incoming
   147 hooked on the main repository is called to keep an eye on incoming
   137 changes.  In any case, changesets need to be understandable, at the
   148 changes.  In any case, changesets need to be understandable, both at
   138 time of writing and many years later.
   149 the time of writing and many years later.
   139 
   150 
   140 Push access to the Isabelle repository requires an account at TUM,
   151 Push access to the Isabelle repository requires an account at TUM,
   141 with properly configured ssh to isabelle-server.in.tum.de.  You also
   152 with properly configured ssh to isabelle-server.in.tum.de.  You also
   142 need to be a member of the "isabelle" Unix group.
   153 need to be a member of the "isabelle" Unix group.
   143 
   154 
   241     Authors of log entries should be aware that published changes are
   252     Authors of log entries should be aware that published changes are
   242     actually read.  The main point is not to announce novelties, but
   253     actually read.  The main point is not to announce novelties, but
   243     to describe faithfully what has been done, and provide some clues
   254     to describe faithfully what has been done, and provide some clues
   244     about the motivation behind it.  The main recipient is someone who
   255     about the motivation behind it.  The main recipient is someone who
   245     needs to understand the change in the distant future to isolate
   256     needs to understand the change in the distant future to isolate
   246     problems.  Sometimes it is helpful to reference past changes via
   257     problems.  Sometimes it is helpful to reference past changes
   247     changeset ids in the log entry.
   258     formally via changeset ids in the log entry.
   248 
   259 
   249   * The standard changelog entry format of the Isabelle repository
   260   * The standard changelog entry format of the Isabelle repository
   250     admits several (vaguely related) items to be rolled into one
   261     admits several (somehow related) items to be rolled into one
   251     changeset.  Each item is then described on a separate line that
   262     changeset.  Each item is then described on a separate line that
   252     may become longer as screen line and is terminated by punctuation.
   263     may become longer as screen line and is terminated by punctuation.
   253     These lines are roughly ordered by importance.
   264     These lines are roughly ordered by importance.
   254 
   265 
   255     This format conforms to established Isabelle tradition.  In
   266     This format conforms to established Isabelle tradition.  In
   266     lines will sometimes display as a single paragraph in HTML, so
   277     lines will sometimes display as a single paragraph in HTML, so
   267     some terminating punctuation is required.  Do not squeeze multiple
   278     some terminating punctuation is required.  Do not squeeze multiple
   268     items on the same line in the original text!
   279     items on the same line in the original text!
   269 
   280 
   270 
   281 
   271 Building a repository version of Isabelle
   282 Testing of changes (before push)
   272 -----------------------------------------
   283 --------------------------------
   273 
   284 
   274 This first requires to resolve add-on components first, including the
   285 The integrity of the standard pull/push area of Isabelle needs the be
   275 ML system.  Some extra configuration is required to approximate some
   286 preserved at all time.  This means that a complete test with default
   276 of the system integration of official Isabelle releases from a
   287 configuration needs to be finished successfully before push.  If the
   277 bare-bones repository snapshot.  The special directory Admin/ -- which
   288 preparation of the push involves a pull/merge phase, its result needs
   278 is absent in official releases -- might provide some further clues.
   289 to covered by the test as well.
   279 
   290 
   280 Here is a reasonably easy way to include important Isabelle components
   291 There are several possibilities to perform the test, e.g. using the
   281 on the spot:
   292 Isabelle testboard at TUM.  In contrast, the subsequent command-line
   282 
   293 examples are for tests on the local machine:
   283   (1) The bash script ISABELLE_HOME_USER/etc/settings is augmented by
   294 
   284   some shell function invocations like this:
   295   ./bin/isabelle build -a  #regular test
   285 
   296 
   286       init_components "$HOME/.isabelle/contrib" "$ISABELLE_HOME/Admin/components/main"
   297   ./bin/isabelle build -a -o document=pdf  #test with document preparation
   287       init_components "$HOME/.isabelle/contrib" "$ISABELLE_HOME/Admin/components/optional"
   298 
   288 
   299   ./bin/isabelle build -a -j2 -o threads=4  #test on multiple cores (example)
   289   This uses some central place "$HOME/.isabelle/contrib" to keep
   300 
   290   component directories that are shared by all Isabelle versions.
   301 See also the chapter on Isabelle sessions and build management in the
   291 
   302 "system" manual.
   292   (2) Missing components are resolved on the command line like this:
   303 
   293 
   304 Note that implicit dependencies on Isabelle components are specified
   294       isabelle components -a
   305 via catalog files in $ISABELLE_HOME/Admin/components/ as part of the
   295 
   306 Mercurial history.  This allows to bisect over a range of Isabelle
   296   This will saturate the "$HOME/.isabelle/contrib" directory structure
   307 versions while references to the contributing components change
   297   according to $ISABELLE_COMPONENT_REPOSITORY.
   308 accordingly.  Recall that "isabelle components -a" updates the local
   298 
   309 component store monotonically according to that information, and thus
   299 Since the given component catalogs in $ISABELLE_HOME/Admin/components
   310 resolves missing components.
   300 are subject to the Mercurial history, it is possible to bisect over a
       
   301 range of Isabelle versions while references to the contributing
       
   302 components change accordingly.
       
   303 
       
   304 The Isabelle build process is managed as follows:
       
   305 
       
   306   * regular "isabelle build" to build session images, for example:
       
   307 
       
   308       isabelle build -b HOL
       
   309 
       
   310   * administrative "isabelle build_doc" to populate the doc/
       
   311     directory, such that "isabelle doc" will find the results, for example:
       
   312 
       
   313       isabelle build_doc -p IsarRef
       
   314