README_REPOSITORY
author wenzelm
Sat, 27 Mar 2021 20:24:04 +0100
changeset 73487 47f055b40ab9
parent 73188 6e7ac8cefe57
child 73498 f5e9ade80579
permissions -rw-r--r--
more convenient repository setup;
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
wenzelm
parents: 71583
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
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    18
50575
ae1da46022d1 prefer implicit build_dialog of isabelle jedit;
wenzelm
parents: 50457
diff changeset
    19
    cd isabelle
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    20
73487
47f055b40ab9 more convenient repository setup;
wenzelm
parents: 73188
diff changeset
    21
    ./bin/isabelle setup
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    22
73487
47f055b40ab9 more convenient repository setup;
wenzelm
parents: 73188
diff changeset
    23
    ./bin/isabelle jedit -l HOL  #start Prover IDE and let it build session image
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    24
73487
47f055b40ab9 more convenient repository setup;
wenzelm
parents: 73188
diff changeset
    25
    ./bin/isabelle build -b HOL  #alternative: build session image manually
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    26
73188
wenzelm
parents: 71583
diff changeset
    27
3. Update repository to particular version (bash shell commands):
50281
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
    28
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
    29
    cd isabelle
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
    30
73487
47f055b40ab9 more convenient repository setup;
wenzelm
parents: 73188
diff changeset
    31
    ./bin/isabelle -r VERSION   #for VERSION e.g. "tip", "Isabelle2021", "9e967acf8f0f"
50575
ae1da46022d1 prefer implicit build_dialog of isabelle jedit;
wenzelm
parents: 50457
diff changeset
    32
73188
wenzelm
parents: 71583
diff changeset
    33
4. Build documentation (bash shell commands):
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    34
53359
ef65d5ee60cf updated according to bceec99254b0;
wenzelm
parents: 51597
diff changeset
    35
    ./bin/isabelle build_doc -a
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    36
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    37
    ./bin/isabelle doc system
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    38
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    39
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    40
Introduction
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    41
------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    42
68378
22680a3f8346 updated URLs;
wenzelm
parents: 67744
diff changeset
    43
Mercurial https://www.mercurial-scm.org belongs to source code
63985
wenzelm
parents: 63490
diff changeset
    44
management systems that follow the so-called paradigm of "distributed
71583
wenzelm
parents: 68378
diff changeset
    45
version control".  This means plain versioning without the legacy of
wenzelm
parents: 68378
diff changeset
    46
SVN and the extra complexity of GIT.  See also
wenzelm
parents: 68378
diff changeset
    47
https://www.mercurial-scm.org/learn
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    48
63985
wenzelm
parents: 63490
diff changeset
    49
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
    50
both between individual developers and designated pull/push areas that
63985
wenzelm
parents: 63490
diff changeset
    51
are shared with others.  This additional freedom demands additional
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    52
responsibility to maintain a certain development process that fits to
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    53
a particular project.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    54
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    55
Regular Mercurial operations are strictly monotonic, where changeset
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    56
transactions are only added, but never deleted or mutated.  There are
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    57
special tools to manipulate repositories via non-monotonic actions
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    58
(such as "rollback" or "strip"), but recovering from gross mistakes
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    59
that have escaped into the public can be hard and embarrassing.  It is
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    60
much easier to inspect and amend changesets routinely before pushing.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    61
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    62
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
    63
a dry run via "incoming" / "outgoing".  The "fetch" extension includes
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    64
useful sanity checks beyond raw "pull" / "update" / "merge", although
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    65
it has lost popularity in recent years.  Most other operations are
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    66
local to the user's repository clone.  This gives some freedom for
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    67
experimentation without affecting anybody else.
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    68
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    69
Mercurial provides nice web presentation of incoming changes with a
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    70
digest of log entries; this also includes RSS/Atom news feeds.  There
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    71
are add-on history browsers such as "hg view" and TortoiseHg.  Unlike
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    72
the default web view, some of these tools help to inspect the semantic
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    73
content of non-trivial merge nodes.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    74
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    75
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    76
Initial configuration
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
    77
---------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    78
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
    79
The main Isabelle repository can be cloned like this:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    80
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
    81
  hg clone https://isabelle.in.tum.de/repos/isabelle
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    82
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    83
This will create a local directory "isabelle", unless an alternative
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    84
name is specified.  The full repository meta-data and history of
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    85
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
    86
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
    87
by another clone operation.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    88
28917
wenzelm
parents: 28913
diff changeset
    89
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
    90
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
    91
initial configuration requires at least an entry to identify yourself
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    92
as follows:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    93
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    94
  [ui]
71583
wenzelm
parents: 68378
diff changeset
    95
  username = ABC
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    96
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    97
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
    98
(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
    99
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
   100
The machine default that Mercurial produces for unspecified
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   101
[ui]username is not appropriate.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   102
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   103
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
   104
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
   105
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   106
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   107
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
   108
default options for common commands:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   109
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   110
  [defaults]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   111
  log = -l 10
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   112
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   113
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
   114
and provides the "glog" command:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   115
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   116
  [extensions]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   117
  hgext.graphlog =
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
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   120
Shared pull/push access
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
   121
-----------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   122
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
   123
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
   124
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
   125
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
   126
regular mechanisms of Mercurial to report changes upstream, say via
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   127
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
   128
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
   129
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
   130
that are included in the Mercurial distribution, and send a "pull
71583
wenzelm
parents: 68378
diff changeset
   131
request" to someone else.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   132
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   133
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
   134
distributed version control community, and works well for occasional
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   135
changes produced by anybody out there.  Of course, upstream
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   136
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
   137
pushing anything onto the official Isabelle repository at TUM.  Direct
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   138
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
   139
hooked on the main repository is called to keep an eye on incoming
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   140
changes.  In any case, changesets need to be understandable, both at
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   141
the time of writing and many years later.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   142
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   143
Push access to the Isabelle repository requires an account at TUM,
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   144
with properly configured ssh to isabelle-server.in.tum.de.  You also
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   145
need to be a member of the "isabelle" Unix group.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   146
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   147
Sharing a locally modified clone then works as follows, using your
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   148
user name instead of "wenzelm":
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   149
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   150
  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
   151
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   152
In fact, the "out" or "outgoing" command performs only a dry run: it
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   153
displays the changesets that would get published.  An actual "push",
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   154
with a lasting effect on the Isabelle repository, works like this:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   155
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   156
  hg push ssh://wenzelm@isabelle-server.in.tum.de//home/isabelle-repository/repos/isabelle
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   157
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   158
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   159
Default paths for push and pull can be configured in
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   160
isabelle/.hg/hgrc, for example:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   161
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   162
  [paths]
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   163
  default = 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
   164
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   165
Now "hg pull" or "hg push" will use that shared file space, unless a
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   166
different URL is specified explicitly.
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   167
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   168
When cloning a repository, the default path is set to the initial
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   169
source URL.  So we could have cloned via that ssh URL in the first
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   170
place, to get exactly to the same point:
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   171
51072
0351cc781a26 standardized isabelle-server.in.tum.de;
wenzelm
parents: 50654
diff changeset
   172
  hg clone 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
   173
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   174
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   175
Simple merges
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   176
-------------
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   177
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   178
The main idea of Mercurial is to let individual users produce
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   179
independent branches of development first, but merge with others
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   180
frequently.  The basic hg merge operation is more general than
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   181
required for the mode of operation with a shared pull/push area.  The
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   182
"fetch" extension accommodates this case nicely, automating trivial
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   183
merges and requiring manual intervention for actual conflicts only.
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   184
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   185
The fetch extension can be configured via $HOME/.hgrc like this:
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   186
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   187
  [extensions]
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   188
  hgext.fetch =
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   189
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   190
  [defaults]
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   191
  fetch = -m "merged"
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   192
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   193
To keep merges semantically trivial and prevent genuine merge
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   194
conflicts or lost updates, it is essential to observe to following
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   195
general discipline wrt. the public Isabelle push area:
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   196
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   197
  * Before editing, pull or fetch the latest version.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   198
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   199
  * Accumulate private commits for a maximum of 1-3 days.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   200
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   201
  * Start publishing again by pull or fetch, which normally produces
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   202
    local merges.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   203
50281
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   204
  * Test the merged result, e.g. like this:
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   205
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   206
      isabelle build -a
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   207
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   208
  * Push back in real time.
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   209
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   210
Piling private changes and public merges longer than 0.5-2 hours is
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   211
apt to produce some mess when pushing eventually!
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   212
50281
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   213
The pull-test-push cycle should not be repeated too fast, to avoid
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   214
delaying others from doing the same concurrently.
cbba16084784 further update and clarification of the all-important README_REPOSITORY;
wenzelm
parents: 49443
diff changeset
   215
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   216
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   217
Content discipline
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
   218
------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   219
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   220
The following principles should be kept in mind when producing
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   221
changesets that are meant to be published at some point.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   222
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   223
  * The author of changes needs to be properly identified, using
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   224
    [ui]username configuration as described above.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   225
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   226
    While Mercurial also provides means for signed changesets, we want
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   227
    to keep things simple and trust that users specify their identity
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   228
    correctly (and uniquely).
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   229
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   230
  * The history of sources is an integral part of the sources
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   231
    themselves.  This means that private experiments and branches
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   232
    should not be published by accident.  Named branches are not
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   233
    allowed on the public version.  Note that old SVN-style branching
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   234
    is replaced by regular repository clones in Mercurial.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   235
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   236
    Exchanging local experiments with some other users can be done
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   237
    directly on peer-to-peer basis, without affecting the central
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   238
    pull/push area.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   239
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   240
  * Log messages are an integral part of the history of sources.
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   241
    Other people will have to inspect them routinely, to understand
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   242
    why things have been done in a certain way at some point.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   243
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   244
    Authors of log entries should be aware that published changes are
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   245
    actually read.  The main point is not to announce novelties, but
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   246
    to describe faithfully what has been done, and provide some clues
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   247
    about the motivation behind it.  The main recipient is someone who
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   248
    needs to understand the change in the distant future to isolate
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   249
    problems.  Sometimes it is helpful to reference past changes
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   250
    formally via changeset ids in the log entry.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   251
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   252
  * The standard changelog entry format of the Isabelle repository
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   253
    admits several (somehow related) items to be rolled into one
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   254
    changeset.  Each item is then described on a separate line that
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   255
    may become longer as screen line and is terminated by punctuation.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   256
    These lines are roughly ordered by importance.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   257
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   258
    This format conforms to established Isabelle tradition.  In
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   259
    contrast, the default of Mercurial prefers a single headline
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   260
    followed by a long body text.  The reason for that is a somewhat
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   261
    different development model of typical "distributed" projects,
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   262
    where external changes pass through a hierarchy of reviewers and
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   263
    maintainers, until they end up in some authoritative repository.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   264
    Isabelle changesets can be more spontaneous, growing from the
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   265
    bottom-up.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   266
67744
5c781dcd5864 prefer https;
wenzelm
parents: 66763
diff changeset
   267
    The web style of https://isabelle.in.tum.de/repos/isabelle
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   268
    accommodates the Isabelle changelog format.  Note that multiple
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   269
    lines will sometimes display as a single paragraph in HTML, so
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   270
    some terminating punctuation is required.  Do not squeeze multiple
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   271
    items on the same line in the original text!
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   272
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   273
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   274
Testing of changes (before push)
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   275
--------------------------------
48497
ba61aceaa18a some updates on "Building a repository version of Isabelle";
wenzelm
parents: 47449
diff changeset
   276
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   277
The integrity of the standard pull/push area of Isabelle needs the be
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   278
preserved at all time.  This means that a complete test with default
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   279
configuration needs to be finished successfully before push.  If the
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   280
preparation of the push involves a pull/merge phase, its result needs
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   281
to covered by the test as well.
28908
4571302e1594 further notes;
wenzelm
parents: 28907
diff changeset
   282
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   283
There are several possibilities to perform the test, e.g. using the
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   284
Isabelle testboard at TUM.  In contrast, the subsequent command-line
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   285
examples are for tests on the local machine:
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   286
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   287
  ./bin/isabelle build -a  #regular test
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   288
63985
wenzelm
parents: 63490
diff changeset
   289
  ./bin/isabelle build -a -o document=pdf  #test with document preparation (optional)
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   290
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   291
  ./bin/isabelle build -a -j2 -o threads=4  #test on multiple cores (example)
48497
ba61aceaa18a some updates on "Building a repository version of Isabelle";
wenzelm
parents: 47449
diff changeset
   292
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   293
See also the chapter on Isabelle sessions and build management in the
66753
f7759beab4f2 more documentation;
wenzelm
parents: 63985
diff changeset
   294
"system" manual. The build option -S is particularly useful for quick
f7759beab4f2 more documentation;
wenzelm
parents: 63985
diff changeset
   295
tests of individual commits, e.g. for each step of a longer chain of
f7759beab4f2 more documentation;
wenzelm
parents: 63985
diff changeset
   296
changes, but the final push always requires a full test as above!
48986
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   297
51502
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   298
Note that implicit dependencies on Isabelle components are specified
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   299
via catalog files in $ISABELLE_HOME/Admin/components/ as part of the
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   300
Mercurial history.  This allows to bisect over a range of Isabelle
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   301
versions while references to the contributing components change
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   302
accordingly.  Recall that "isabelle components -a" updates the local
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   303
component store monotonically according to that information, and thus
ed5d96d01b2f more "quick start" hints;
wenzelm
parents: 51072
diff changeset
   304
resolves missing components.