1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
+
+
+
+
+
+
+
-
+
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
## Status
This is a discussion format and record of ideas for
"Fossil: The Next Generation" or Fossil-NG. There is currently no code in place for Fossil-NG.
Broadly, this document collects ideas that have come up since Fossil was created in 2006 which are difficult enough to build atop the current design that solving them might involve a breakage in compatibility with prior Fossil versions. Much as [the hash policy feature][hpol] forced the change from Fossil 1.x to Fossil 2.0, implementing some of the following ideas might force a similarly epochal shift to "Fossil 3.0" or "Fossil 4.0".
[hpol]: /doc/trunk/www/hashpolicy.wiki
## Goals
In evaluating the following ideas, it is important to keep in mind that the primary and most important purpose of Fossil is to support the
development of the [SQLite](https://sqlite.org/) project; it has succeeded fabulously in that respect. Any changes implemented
for Fossil-NG must respect that history. In particular, Fossil-NG
must be able to import the complete SQLite history intact, without
any changes to hash identifiers.
### Partial Clones and Syncs
Fossil is currently limited to complete clones and complete syncs. This has several drawbacks in real-world workflows which are solved by features allowing partial clones and syncs:
Fossil is currently limited to complete clones and complete syncs. This has several drawbacks in real-world workflows which we can solve by adding support for:
+ **Shallow Clones** - the ability to clone just the recent history
of a project
of a project.
This allows efficient working clones of very large repositories: you almost certainly don't need all 25 years of the past history of a long-running project on your local machine, and if you do, you almost certainly don't need all of it 5 minutes after the initial clone. It should be possible to clone only, say, the past 30 days on all open branches initially, then have other artifacts pulled from the central repository only as necessary.
+ **Narrow Clones** - the ability to clone a subset of a project,
for example to clone only the files in the `src/` directory and
omit all of the files in the `test/` directory.
+ **Narrow Clones** - the ability to clone a subset of a project, selected by subdirectory.
There are two primary use cases:
First, you might have a simple single-project repository with subdirectories like `doc/`, `src/`, `test/`, etc., but you might only need, say, the `src/` subdirectory for a given operation. There's no point taking up disk space in the checkout directory with subdirectories holding files you have no intention of ever using.
Second, Fossil currently works best with the repo-per-project version control strategy. Fossil's speed drops continually as the size of the repository grows, in large part due to lookup times in the SQLite repo DB file being roughly proportional to `log(N)`, where N is the number of artifacts, checkins, files, etc. This is true of most other DVCSes, but there remain good arguments for a [monorepo][mr]. Narrow clones allow you to have a monorepo but work with only the subset of it that you actually need in a given case.
+ **Selective Sync** - the ability to push/pull/sync single branches.
The current closest alternative to this are [private branches][pb], but those have a number of workflow drawbacks.
[mr]: https://en.wikipedia.org/wiki/Monorepo
[pb]: /doc/trunk/www/private.wiki
### <a id="git"></a>Better Git Integration
Although Fossil is [nearly as old as Git][lwnh] and several other popular [DVCSes][dvcs], Git has emerged as the dominant DVCS though various market forces, rather than on purely technical merit. (See [Fossil vs. Git][fvg].)
Although Fossil is [nearly as old as Git][lwnh] and several other popular [DVCSes][dvcs], Git has emerged as the dominant DVCS in part due to market forces, rather than on purely technical merit. (See [Fossil vs. Git][fvg].)
This is unfortunate, because of the various
version control systems available today, Git is the least user-friendly.
Nevertheless, Fossil must have some level of accommodation with this reality.
Fossil 2.x currently has several features in this line, primarily the longstanding [`fossil import --git`][fig] command and the much newer [`fossil git export`][fge] command. (The latter replaces the old `fossil export --git` command, deprecated in Fossil 2.9.)
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
-
-
-
-
-
-
|
+ **Git as Fossil Back-End:** If we do both of the above, then we're just a few steps away from using the Git repository format as a Fossil storage option from the start. That is, instead of starting work with Git and then converting to Fossil, you could say something like:
$ fossil init --git repo
...to create a Git packfile-formatted repository directory. You'd lose Fossil features like the ticket tracker, the wiki, the web forum, etc., of course.
Realize in evaluating all of these ideas that the primary and most important purpose of Fossil is to support the
development of the [SQLite](https://sqlite.org/) project, and it lhas succeeded fabulously in that respect. Any changes implemented
for Fossil-NG must respect that history. In particular, Fossil-NG
must be able to import the complete SQLite history intact, without
any changes to hash identifiers.
[dvcs]: https://en.wikipedia.org/wiki/Distributed_version_control
[fge]: /help?cmd=git
[fig]: /help?cmd=import
[fvg]: /doc/trunk/www/fossil-v-git.wiki
[lwnh]: https://lwn.net/Articles/433843/
|