README_REPOSITORY
author wenzelm
Wed, 26 Sep 2012 15:01:45 +0200
changeset 49575 7529c77ee92e
parent 49443 75633efcc70d
child 50281 cbba16084784
permissions -rw-r--r--
more uniform graphview terminology;
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
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
     4
Quick start in 20min
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
49443
wenzelm
parents: 49348
diff changeset
     7
1. Ensure that "hg" (Mercurial) is installed; see also
wenzelm
parents: 49348
diff changeset
     8
   http://www.selenic.com/mercurial
49348
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
     9
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    10
2. Create file $HOME/.isabelle/etc/settings and insert the following
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    11
   line near its beginning:
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    12
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    13
    init_components "$HOME/.isabelle/contrib" "$ISABELLE_HOME/Admin/components/main"
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    14
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    15
3. Execute shell commands as follows:
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    16
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    17
    hg clone http://isabelle.in.tum.de/repos/isabelle
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    18
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    19
    ./isabelle/bin/isabelle components -a
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    20
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    21
    ./isabelle/bin/isabelle build -b HOL
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    22
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    23
    ./isabelle/bin/isabelle jedit
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    24
01d2d01bf9d1 instructions for quick start in 20min;
wenzelm
parents: 48986
diff changeset
    25
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    26
Introduction
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    27
------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    28
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    29
Mercurial http://www.selenic.com/mercurial belongs to the current
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    30
generation of source code management systems that follow the so-called
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    31
paradigm of "distributed version control".  This is a terrific name
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    32
for plain revision control without the legacy of CVS or SVN.  See also
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    33
http://hginit.com/ for an introduction to the main ideas.  The
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    34
Mercurial book http://hgbook.red-bean.com/ explains many more details.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    35
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    36
Mercurial offers great flexibility in organizing the flow of changes,
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    37
both between individual developers and designated pull/push areas that
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    38
are shared with others.  This additional power demands some additional
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    39
responsibility to maintain a certain development process that fits to
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    40
a particular project.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    41
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    42
Regular Mercurial operations are strictly monotonic, where changeset
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    43
transactions are only added, but never deleted.  There are special
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    44
tools to manipulate repositories via non-monotonic actions (such as
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    45
"rollback" or "strip"), but recovering from gross mistakes that have
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    46
escaped into the public can be hard and embarrassing.  It is much
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    47
easier to inspect and amend changesets routinely before pushing.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    48
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    49
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
    50
a dry run via "incoming" / "outgoing".  The "fetch" extension includes
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    51
useful sanity checks beyond raw "pull" / "update" / "merge".  Most
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    52
other operations are local to the user's repository clone.  This gives
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    53
some freedom for experimentation without affecting anybody else.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    54
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    55
Mercurial provides nice web presentation of incoming changes with a
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    56
digest of log entries; this also includes RSS/Atom news feeds.  There
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    57
are add-on history browsers such as "hg view" and TortoiseHg.  Unlike
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    58
the default web view, some of these tools help to inspect the semantic
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
    59
content of non-trivial merge nodes.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    60
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    61
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    62
Initial configuration
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
    63
---------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    64
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
    65
The official Isabelle repository can be cloned like this:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    66
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    67
  hg clone http://isabelle.in.tum.de/repos/isabelle
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    68
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    69
This will create a local directory "isabelle", unless an alternative
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    70
name is specified.  The full repository meta-data and history of
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    71
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
    72
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
    73
by another clone operation.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    74
28917
wenzelm
parents: 28913
diff changeset
    75
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
    76
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
    77
initial configuration requires at least an entry to identify yourself
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    78
as follows:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    79
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    80
  [ui]
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    81
  username = XXX
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    82
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    83
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
    84
(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
    85
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
    86
The machine default that Mercurial produces for unspecified
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    87
[ui]username is not appropriate.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    88
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    89
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
    90
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
    91
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    92
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    93
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
    94
default options for common commands:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    95
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    96
  [defaults]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    97
  log = -l 10
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
    98
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
    99
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
   100
and provides the "glog" command:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   101
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   102
  [extensions]
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   103
  hgext.graphlog =
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   104
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
Shared pull/push access
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
   107
-----------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   108
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   109
The entry point http://isabelle.in.tum.de/repos/isabelle is world
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   110
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
   111
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
   112
regular mechanisms of Mercurial to report changes upstream, say via
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   113
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
   114
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
   115
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
   116
that are included in the Mercurial distribution, and send a "pull
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   117
request" to someone else.  There are also public hosting services for
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   118
Mercurial repositories.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   119
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   120
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
   121
distributed version control community, and works well for occasional
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   122
changes produced by anybody out there.  Of course, upstream
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   123
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
   124
pushing anything onto the official Isabelle repository at TUM.  Direct
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   125
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
   126
hooked on the main repository is called to keep an eye on incoming
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   127
changes.  In any case, changesets need to be understandable, at the
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   128
time of writing and many years later.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   129
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   130
Push access to the Isabelle repository requires an account at TUM,
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   131
with properly configured ssh to the local machines (e.g. macbroy20 ..
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   132
macbroy29).  You also need to be a member of the "isabelle" Unix
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   133
group.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   134
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   135
Sharing a locally modified clone then works as follows, using your
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   136
user name instead of "wenzelm":
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   137
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   138
  hg out ssh://wenzelm@macbroy20//home/isabelle-repository/repos/isabelle
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   139
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   140
In fact, the "out" or "outgoing" command performs only a dry run: it
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   141
displays the changesets that would get published.  An actual "push",
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   142
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
   143
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   144
  hg push ssh://wenzelm@macbroy20//home/isabelle-repository/repos/isabelle
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   145
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   146
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   147
Default paths for push and pull can be configured in
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   148
isabelle/.hg/hgrc, for example:
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   149
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   150
  [paths]
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   151
  default = ssh://wenzelm@macbroy20//home/isabelle-repository/repos/isabelle
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   152
28913
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   153
Now "hg pull" or "hg push" will use that shared file space, unless a
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   154
different URL is specified explicitly.
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   155
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   156
When cloning a repository, the default path is set to the initial
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   157
source URL.  So we could have cloned via that ssh URL in the first
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   158
place, to get exactly to the same point:
86ed1c86e0ef misc tuning and clarification;
wenzelm
parents: 28910
diff changeset
   159
47449
5e1482296b12 misc tuning;
wenzelm
parents: 40601
diff changeset
   160
  hg clone ssh://wenzelm@macbroy20//home/isabelle-repository/repos/isabelle
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
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   163
Simple merges
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   164
-------------
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   165
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   166
The main idea of Mercurial is to let individual users produce
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   167
independent branches of development first, but merge with others
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   168
frequently.  The basic hg merge operation is more general than
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   169
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
   170
"fetch" extension accommodates this case nicely, automating trivial
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   171
merges and requiring manual intervention for actual conflicts only.
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   172
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   173
The fetch extension can be configured via $HOME/.hgrc like this:
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   174
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   175
  [extensions]
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   176
  hgext.fetch =
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   177
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   178
  [defaults]
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   179
  fetch = -m "merged"
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   180
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   181
To keep merges semantically trivial and prevent genuine merge
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   182
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
   183
general discipline wrt. the public Isabelle push area:
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   184
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   185
  * Before editing, pull or fetch the latest version.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   186
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   187
  * Accumulate private commits for a maximum of 1-3 days.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   188
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   189
  * Start publishing again by pull or fetch, which normally produces
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   190
    local merges.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   191
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   192
  * Test the merged result as usual and push back in real time.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   193
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   194
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
   195
apt to produce some mess when pushing eventually!
30182
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   196
db768c888dfa minor update of Mercurial HOWTO;
wenzelm
parents: 29481
diff changeset
   197
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   198
Content discipline
29481
3e8420c1124a tuned ASCII art;
wenzelm
parents: 28918
diff changeset
   199
------------------
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   200
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   201
The following principles should be kept in mind when producing
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   202
changesets that are meant to be published at some point.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   203
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   204
  * The author of changes needs to be properly identified, using
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   205
    [ui]username configuration as described above.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   206
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   207
    While Mercurial also provides means for signed changesets, we want
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   208
    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
   209
    correctly (and uniquely).
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   210
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   211
  * The history of sources is an integral part of the sources
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   212
    themselves.  This means that private experiments and branches
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   213
    should not be published by accident.  Named branches are not
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   214
    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
   215
    is replaced by regular repository clones in Mercurial.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   216
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   217
    Exchanging local experiments with some other users can be done
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   218
    directly on peer-to-peer basis, without affecting the central
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   219
    pull/push area.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   220
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   221
  * 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
   222
    Other people will have to inspect them routinely, to understand
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   223
    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
   224
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   225
    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
   226
    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
   227
    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
   228
    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
   229
    needs to understand the change in the distant future to isolate
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   230
    problems.  Sometimes it is helpful to reference past changes via
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   231
    changeset ids in the log entry.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   232
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   233
  * The standard changelog entry format of the Isabelle repository
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   234
    admits several (vaguely related) items to be rolled into one
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   235
    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
   236
    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
   237
    These lines are roughly ordered by importance.
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   238
40601
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   239
    This format conforms to established Isabelle tradition.  In
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   240
    contrast, the default of Mercurial prefers a single headline
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   241
    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
   242
    different development model of typical "distributed" projects,
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   243
    where external changes pass through a hierarchy of reviewers and
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   244
    maintainers, until they end up in some authoritative repository.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   245
    Isabelle changesets can be more spontaneous, growing from the
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   246
    bottom-up.
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   247
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   248
    The web style of http://isabelle.in.tum.de/repos/isabelle/
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   249
    accommodates the Isabelle changelog format.  Note that multiple
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   250
    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
   251
    some terminating punctuation is required.  Do not squeeze multiple
021278fdd0a8 some updates after 2 years of Mercurial usage;
wenzelm
parents: 36858
diff changeset
   252
    items on the same line in the original text!
28907
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   253
1a470f95ef18 Important notes on Mercurial repository access for Isabelle.
wenzelm
parents:
diff changeset
   254
32361
141e5151b918 clarified situation about unidentified repository versions -- in a distributed setting there is not "the" repository;
wenzelm
parents: 30182
diff changeset
   255
Building a repository version of Isabelle
141e5151b918 clarified situation about unidentified repository versions -- in a distributed setting there is not "the" repository;
wenzelm
parents: 30182
diff changeset
   256
-----------------------------------------
28908
4571302e1594 further notes;
wenzelm
parents: 28907
diff changeset
   257
48986
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   258
This first requires to resolve add-on components first, including the
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   259
ML system.  Some extra configuration is required to approximate some
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   260
of the system integration of official Isabelle releases from a
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   261
bare-bones repository snapshot.  The special directory Admin/ -- which
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   262
is absent in official releases -- might provide some further clues.
48497
ba61aceaa18a some updates on "Building a repository version of Isabelle";
wenzelm
parents: 47449
diff changeset
   263
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   264
Here is a reasonably easy way to include important Isabelle components
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   265
on the spot:
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   266
48854
f7cbf24b5f41 Backed out changeset ec82c33c75f8;
wenzelm
parents: 48853
diff changeset
   267
  (1) The bash script ISABELLE_HOME_USER/etc/settings is augmented by
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   268
  some shell function invocations like this:
28908
4571302e1594 further notes;
wenzelm
parents: 28907
diff changeset
   269
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   270
      init_components "$HOME/.isabelle/contrib" "$ISABELLE_HOME/Admin/components/main"
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   271
      init_components "$HOME/.isabelle/contrib" "$ISABELLE_HOME/Admin/components/optional"
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   272
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   273
  This uses some central place "$HOME/.isabelle/contrib" to keep
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   274
  component directories that are shared by all Isabelle versions.
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   275
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   276
  (2) Missing components are resolved on the command line like this:
48497
ba61aceaa18a some updates on "Building a repository version of Isabelle";
wenzelm
parents: 47449
diff changeset
   277
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   278
      isabelle components -a
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   279
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   280
  This will saturate the "$HOME/.isabelle/contrib" directory structure
48855
wenzelm
parents: 48854
diff changeset
   281
  according to $ISABELLE_COMPONENT_REPOSITORY.
48497
ba61aceaa18a some updates on "Building a repository version of Isabelle";
wenzelm
parents: 47449
diff changeset
   282
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   283
Since the given component catalogs in $ISABELLE_HOME/Admin/components
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   284
are subject to the Mercurial history, it is possible to bisect over a
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   285
range of Isabelle versions while references to the contributing
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48497
diff changeset
   286
components change accordingly.
48986
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   287
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   288
The Isabelle build process is managed as follows:
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   289
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   290
  * regular "isabelle build" to build session images, e.g. HOL;
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   291
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   292
  * administrative "isabelle build_doc" to populate the doc/
037d32448e29 update on "isabelle build" and "isabelle build_doc";
wenzelm
parents: 48855
diff changeset
   293
    directory, such that "isabelle doc" will find the results.