README_REPOSITORY
author wenzelm
Sat, 27 Nov 2021 14:55:47 +0100
changeset 74855 a5eb407ec867
parent 73590 1aa9ef7a3eaf
child 78479 b2bb63d11ade
permissions -rw-r--r--
clarified tests: omit somewhat pointless (unstable) results;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
     1
Important notes on Mercurial repository access for Isabelle
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
     2
===========================================================
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
     3
54963
wenzelm
parents: 53359
diff changeset
     4
Quick start in 30min
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
     5
--------------------
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
     6
73188
wenzelm
parents: 71583
diff changeset
     7
1. Platform prerequisites: ensure that "curl" and "hg" (Mercurial) are installed
wenzelm
parents: 71583
diff changeset
     8
wenzelm
parents: 71583
diff changeset
     9
  (a) Linux: e.g. "sudo apt install curl mercurial
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    10
73188
wenzelm
parents: 71583
diff changeset
    11
  (b) macOS: e.g. "brew install mercurial" or download from https://www.mercurial-scm.org
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    12
73188
wenzelm
parents: 71583
diff changeset
    13
  (c) Windows: use Cygwin64 with packages "curl" and "mercurial" (via Cygwin setup-x86_64.exe)
wenzelm
parents: 71583
diff changeset
    14
73514
01acd0eb29ce clarified name;
wenzelm
parents: 73504
diff changeset
    15
2. Initial repository clone (bash shell commands):
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    16
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
    17
    hg clone https://isabelle.in.tum.de/repos/isabelle
73514
01acd0eb29ce clarified name;
wenzelm
parents: 73504
diff changeset
    18
    isabelle/Admin/init
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    19
73514
01acd0eb29ce clarified name;
wenzelm
parents: 73504
diff changeset
    20
3. Switch repository to particular version (bash shell commands):
50281
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
    21
73584
1d4c9fa00821 clarified options;
wenzelm
parents: 73516
diff changeset
    22
    #latest official release
1d4c9fa00821 clarified options;
wenzelm
parents: 73516
diff changeset
    23
    isabelle/Admin/init -R
1d4c9fa00821 clarified options;
wenzelm
parents: 73516
diff changeset
    24
73589
479e9b17090e clarified options (again);
wenzelm
parents: 73585
diff changeset
    25
    #latest version from repository server
479e9b17090e clarified options (again);
wenzelm
parents: 73585
diff changeset
    26
    isabelle/Admin/init -u
73584
1d4c9fa00821 clarified options;
wenzelm
parents: 73516
diff changeset
    27
73589
479e9b17090e clarified options (again);
wenzelm
parents: 73585
diff changeset
    28
    #latest version from local history
479e9b17090e clarified options (again);
wenzelm
parents: 73585
diff changeset
    29
    isabelle/Admin/init -u -L
73498
f5e9ade80579 clarified;
wenzelm
parents: 73487
diff changeset
    30
f5e9ade80579 clarified;
wenzelm
parents: 73487
diff changeset
    31
    #explicit changeset id or tag (e.g. "Isabelle2021")
73590
1aa9ef7a3eaf updated example;
wenzelm
parents: 73589
diff changeset
    32
    isabelle/Admin/init -r 479e9b17090e
73498
f5e9ade80579 clarified;
wenzelm
parents: 73487
diff changeset
    33
73504
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    34
4. Run application:
50575
ae1da46022d1 prefer implicit build_dialog of isabelle jedit;
wenzelm
parents: 50457
diff changeset
    35
73504
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    36
    #start Prover IDE and let it build session image
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    37
    isabelle/bin/isabelle jedit -l HOL
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    38
73516
wenzelm
parents: 73514
diff changeset
    39
    #alternative: build session image separately
73504
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    40
    isabelle/bin/isabelle build -b HOL
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    41
c259c7a42ac3 more options: build is part of default setup;
wenzelm
parents: 73503
diff changeset
    42
5. Build documentation (bash shell commands):
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    43
73503
eda1d95ef538 misc tuning and clarification;
wenzelm
parents: 73499
diff changeset
    44
    isabelle/bin/isabelle build_doc -a
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    45
73503
eda1d95ef538 misc tuning and clarification;
wenzelm
parents: 73499
diff changeset
    46
    isabelle/bin/isabelle doc system
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    47
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    48
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    49
Introduction
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    50
------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    51
68378
22680a3f8346 updated URLs;
wenzelm
parents: 67744
diff changeset
    52
Mercurial https://www.mercurial-scm.org belongs to source code
63985
wenzelm
parents: 63490
diff changeset
    53
management systems that follow the so-called paradigm of "distributed
71583
wenzelm
parents: 68378
diff changeset
    54
version control".  This means plain versioning without the legacy of
wenzelm
parents: 68378
diff changeset
    55
SVN and the extra complexity of GIT.  See also
wenzelm
parents: 68378
diff changeset
    56
https://www.mercurial-scm.org/learn
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    57
63985
wenzelm
parents: 63490
diff changeset
    58
Mercurial offers some flexibility in organizing the flow of changes,
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    59
both between individual developers and designated pull/push areas that
63985
wenzelm
parents: 63490
diff changeset
    60
are shared with others.  This additional freedom demands additional
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    61
responsibility to maintain a certain development process that fits to
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    62
a particular project.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    63
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    64
Regular Mercurial operations are strictly monotonic, where changeset
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    65
transactions are only added, but never deleted or mutated.  There are
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    66
special tools to manipulate repositories via non-monotonic actions
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    67
(such as "rollback" or "strip"), but recovering from gross mistakes
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    68
that have escaped into the public can be hard and embarrassing.  It is
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    69
much easier to inspect and amend changesets routinely before pushing.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    70
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    71
The effect of the critical "pull" / "push" operations can be tested in
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    72
a dry run via "incoming" / "outgoing".  The "fetch" extension includes
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    73
useful sanity checks beyond raw "pull" / "update" / "merge", although
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    74
it has lost popularity in recent years.  Most other operations are
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    75
local to the user's repository clone.  This gives some freedom for
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    76
experimentation without affecting anybody else.
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    77
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    78
Mercurial provides nice web presentation of incoming changes with a
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    79
digest of log entries; this also includes RSS/Atom news feeds.  There
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    80
are add-on history browsers such as "hg view" and TortoiseHg.  Unlike
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    81
the default web view, some of these tools help to inspect the semantic
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    82
content of non-trivial merge nodes.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    83
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    84
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    85
Initial configuration
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
    86
---------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    87
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    88
The main Isabelle repository can be cloned like this:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    89
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
    90
  hg clone https://isabelle.in.tum.de/repos/isabelle
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    91
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    92
This will create a local directory "isabelle", unless an alternative
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    93
name is specified.  The full repository meta-data and history of
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    94
changes is in isabelle/.hg; local configuration for this clone can be
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    95
added to isabelle/.hg/hgrc, but note that hgrc files are never copied
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    96
by another clone operation.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    97
28917
wenzelm
parents: 28913
diff changeset
    98
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
    99
There is also $HOME/.hgrc for per-user Mercurial configuration.  The
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   100
initial configuration requires at least an entry to identify yourself
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   101
as follows:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   102
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   103
  [ui]
71583
wenzelm
parents: 68378
diff changeset
   104
  username = ABC
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   105
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   106
Isabelle contributors are free to choose either a short "login name"
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   107
(for accounts at TU Munich) or a "full name" -- with or without mail
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   108
address.  It is important to stick to this choice once and for all.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   109
The machine default that Mercurial produces for unspecified
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   110
[ui]username is not appropriate.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   111
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   112
Such configuration can be given in $HOME/.hgrc (for each home
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   113
directory on each machine) or in .hg/hgrc (for each repository clone).
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   114
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   115
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   116
Here are some further examples for hgrc.  This is how to provide
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   117
default options for common commands:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   118
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   119
  [defaults]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   120
  log = -l 10
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   121
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   122
This is how to configure some extension, which is called "graphlog"
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   123
and provides the "glog" command:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   124
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   125
  [extensions]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   126
  hgext.graphlog =
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   127
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   128
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   129
Shared pull/push access
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
   130
-----------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   131
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
   132
The entry point https://isabelle.in.tum.de/repos/isabelle is world
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   133
readable, both via plain web browsing and the hg client as described
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   134
above.  Anybody can produce a clone, change it locally, and then use
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   135
regular mechanisms of Mercurial to report changes upstream, say via
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   136
mail to someone with write access to that file space.  It is also
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   137
quite easy to publish changed clones again on the web, using the
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   138
ad-hoc command "hg serve -v", or the hgweb.cgi or hgwebdir.cgi scripts
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   139
that are included in the Mercurial distribution, and send a "pull
71583
wenzelm
parents: 68378
diff changeset
   140
request" to someone else.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   141
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   142
The downstream/upstream mode of operation is quite common in the
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   143
distributed version control community, and works well for occasional
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   144
changes produced by anybody out there.  Of course, upstream
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   145
maintainers need to review and moderate changes being proposed, before
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   146
pushing anything onto the official Isabelle repository at TUM.  Direct
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   147
pushes are also reviewed routinely in a post-hoc fashion; everybody
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   148
hooked on the main repository is called to keep an eye on incoming
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   149
changes.  In any case, changesets need to be understandable, both at
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   150
the time of writing and many years later.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   151
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   152
Push access to the Isabelle repository requires an account at TUM,
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   153
with properly configured ssh to isabelle-server.in.tum.de.  You also
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   154
need to be a member of the "isabelle" Unix group.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   155
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   156
Sharing a locally modified clone then works as follows, using your
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   157
user name instead of "wenzelm":
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   158
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   159
  hg out ssh://wenzelm@isabelle-server.in.tum.de//home/isabelle-repository/repos/isabelle
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   160
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   161
In fact, the "out" or "outgoing" command performs only a dry run: it
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910