Mercurial > hg
annotate doc/Makefile @ 40392:595641bd8404
sqlitestore: support for storing revisions without their parents
This commit kinda/sorta implements the equivalent of ellipsis nodes for
the SQLite storage backend.
Without implementing full blown ellipsis nodes (and the necessary support for
them in the wire protocol), we instead teach the store to rewrite the p1 and
p2 nodes to nullid when the incoming parent isn't in the local store. This allows
servers to remain dumb and send the real parent and have the clients deal
with the missing parent problem.
This obviously isn't ideal because a benefit of ellipsis nodes is we can
insert a fake parent to ellide missing changesets. But neither solution is
ideal because it drops the original parent from storage. We could probably
teach the SQLite store to retain the original parent and handle missing
parents at read time. However, parent revisions are stored as integers and
it isn't trivial to store an "empty" revision in the store yet, which would
be necessary to represent the "missing" parent.
The store is somewhat intelligent in trying to remove the missing parents
metadata when the revision is re-added. But, revision numbers will be all
messed up in that case, so I'm not sure it is worth it. At some point we'll
likely want to remove the concept of revision numbers from the database and
have the store invent them at index generation time. Or even better, we can
do away with revision numbers from the file storage interface completely.
We'll get there eventually...
Differential Revision: https://phab.mercurial-scm.org/D5168
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 17 Oct 2018 17:32:15 +0200 |
parents | b584ed1b225d |
children | d80d48928eb1 |
rev | line source |
---|---|
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
19425
diff
changeset
|
1 SOURCES=$(notdir $(wildcard ../mercurial/help/*.[0-9].txt)) |
671
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
2 MAN=$(SOURCES:%.txt=%) |
efa4a7e2f322
Move hgrc documentation out to its own man page, hgrc(5).
Bryan O'Sullivan <bos@serpentine.com>
parents:
465
diff
changeset
|
3 HTML=$(SOURCES:%.txt=%.html) |
12921
6b6e7da9bccd
doc/Makefile: docs now also depend on extensions
Martin Geisler <mg@aragost.com>
parents:
12841
diff
changeset
|
4 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \ |
6b6e7da9bccd
doc/Makefile: docs now also depend on extensions
Martin Geisler <mg@aragost.com>
parents:
12841
diff
changeset
|
5 ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py |
2233 | 6 PREFIX=/usr/local |
4030
a48971ae1387
install man pages by default into $(PREFIX)/share/man not $(PREFIX)/man since the FHS puts them there
Jonathan Smith <https://issues.rpath.com/>
parents:
3908
diff
changeset
|
7 MANDIR=$(PREFIX)/share/man |
7686
fa584d23e3cc
Do not install executable man pages
Christian Ebert <blacktrash@gmx.net>
parents:
7660
diff
changeset
|
8 INSTALL=install -c -m 644 |
6724
2e58f1a36046
use ${PYTHON} var in doc/Makefile as well
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6486
diff
changeset
|
9 PYTHON=python |
13054
25200c7efe0f
runrst: add RSTARGS Makefile variable to allow customization
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12921
diff
changeset
|
10 RSTARGS= |
465 | 11 |
19427
80983af366b5
doc: make i18n man and html
Takumi IINO <trot.thunder@gmail.com>
parents:
19426
diff
changeset
|
12 export HGENCODING=UTF-8 |
9971
fa99480d5135
doc/Makefile: ensure C locale
Martin Geisler <mg@lazybytes.net>
parents:
9703
diff
changeset
|
13 |
1006
b0e581438835
Generate html documentation by default, too.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
671
diff
changeset
|
14 all: man html |
465 | 15 |
16 man: $(MAN) | |
17 | |
18 html: $(HTML) | |
19 | |
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
19425
diff
changeset
|
20 common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt): $(GENDOC) |
34622
b584ed1b225d
build: make install in "/doc" failed if the destination dir contained spaces
muxator <a.mux@inwind.it>
parents:
19427
diff
changeset
|
21 ${PYTHON} gendoc.py "$(basename $@)" > $@.tmp |
9444
2f7f6e43d52b
doc/Makefile: do not create files in case of errors
Martin Geisler <mg@lazybytes.net>
parents:
9422
diff
changeset
|
22 mv $@.tmp $@ |
1814
7956893e8458
generate hg manpage from commands.py docstring
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1689
diff
changeset
|
23 |
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
19425
diff
changeset
|
24 %: %.txt %.gendoc.txt common.txt |
13054
25200c7efe0f
runrst: add RSTARGS Makefile variable to allow customization
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12921
diff
changeset
|
25 $(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \ |
9445
f0105f2c424c
doc/Makefile: make rst2html and rst2man halt on warnings
Martin Geisler <mg@lazybytes.net>
parents:
9444
diff
changeset
|
26 --strip-elements-with-class htmlonly $*.txt $* |
465 | 27 |
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
19425
diff
changeset
|
28 %.html: %.txt %.gendoc.txt common.txt |
13054
25200c7efe0f
runrst: add RSTARGS Makefile variable to allow customization
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12921
diff
changeset
|
29 $(PYTHON) runrst html $(RSTARGS) --halt warning \ |
9626
d1aa5393bef4
doc: add a style sheet to the generated HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9445
diff
changeset
|
30 --link-stylesheet --stylesheet-path style.css $*.txt $*.html |
465 | 31 |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
32 MANIFEST: man html |
9401
2a5144687727
doc/Makefile: Don't show Makefile comments in output
Mads Kiilerich <mads@kiilerich.com>
parents:
9400
diff
changeset
|
33 # tracked files are already in the main MANIFEST |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
34 $(RM) $@ |
12841
5fbc2c38a98f
doc/Makefile: do not include hg.1.gendoc.txt in MANIFEST
Martin Geisler <mg@lazybytes.net>
parents:
12840
diff
changeset
|
35 for i in $(MAN) $(HTML); do \ |
3872
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
36 echo "doc/$$i" >> $@ ; \ |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
37 done |
9d7ac8613340
fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3269
diff
changeset
|
38 |
2233 | 39 install: man |
40 for i in $(MAN) ; do \ | |
8822
1027da7d2fb9
doc: fix regexp for determining the man page section
Cédric Duval <cedricduval@free.fr>
parents:
8311
diff
changeset
|
41 subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \ |
34622
b584ed1b225d
build: make install in "/doc" failed if the destination dir contained spaces
muxator <a.mux@inwind.it>
parents:
19427
diff
changeset
|
42 mkdir -p "$(DESTDIR)$(MANDIR)"/$$subdir ; \ |
b584ed1b225d
build: make install in "/doc" failed if the destination dir contained spaces
muxator <a.mux@inwind.it>
parents:
19427
diff
changeset
|
43 $(INSTALL) $$i "$(DESTDIR)$(MANDIR)"/$$subdir ; \ |
2233 | 44 done |
45 | |
465 | 46 clean: |
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
19425
diff
changeset
|
47 $(RM) $(MAN) $(HTML) common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt) MANIFEST |