Skip to content
Fossil Changes To Fossil-NG
Login

Changes To Fossil-NG

Changes to "Fossil-NG" between 2017-11-18 20:57:19 and 2019-05-09 11:13:57

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
55
56
57
58
59
60
61
62
63
64
65
66
67

68

69
70
71
72
73
74
75
76


77
78
79
80
81
82
83

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
55
56
57
58
59


60
61

62
63
64
65
66
67
68
69
70
71
72
73

74
75




76
77
78
79
80

81

82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
-
+

-
-
-
+
+
+
+
+
+
+



-
-
-
+
+
+





-
-
+
+

-
+

-
-
+
+
+
+
+
+

-
-
-
-
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-




+
+
+
+
+
+
+
+
-
+

-
-
-
-
+
+
+


-
+
-





-
+















+
-
+








+
+







## Overview
## Status

This is a discussion format and record of ideas for the
"Fossil - Next Generation" or Fossil-NG.  As this sentence is
being written (2017-11-18) there is no code in place for Fossil-NG.
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

The first goal of Fossil-NG is to enhance and improve the Fossil user
experience based on lessons learned from 11 years using and maintaining
legacy Fossil.  New capabilities include:
### 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:

  +  **Shallow Clones** - the ability to clone just the recent history
     of a project

  +  **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.
     for example to clone only the files in the `src/` directory and
     omit all of the files in the `test/` directory.

  +  **Selective Sync** - the ability to push/pull/sync since branches.
  +  **Selective Sync** - the ability to push/pull/sync single branches.

In the 11 years since Fossil was created, Git has become the dominate
version control system.  This is unfortunate, because of the various

### <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].)

This is unfortunate, because of the various
version control systems available today, Git is the least user-friendly.
Nevertheless, there is no denying that any new version control system
(VCS) will need to deal effectively with the Git legacy.  For this
reason, one important goal of Fossil-NG is to allow seamless integration
with legacy Git repositories.

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.)

There are still some missing pieces, however. We'd like to be able to:

  +  **Round-Trip with Git:** A [Git export of a Fossil repository][fge] is basically a read-only clone. All checkins to the project must go through Fossil, not through Git. In the same way that `fossil export --git` was replaced with the more powerful `fossil git export` command, we'd like a `fossil git import` command that would sync changes to a Git repo back into a Fossil repo, allowing full round-tripping between the two, within the limitations of the various formats.

    (We word it that way to exclude things outside the Git file format; we aren't going to try to make GitHub issues sync as Fossil tickets and vice versa, for example.)

  +  **Fossil as Git Front-End:** It would be nice to be able to use the superior `fossil` command line and web UI experiences with preexisting Git repos without doing a `fossil import --git` conversion. We'd like all of the following to work:

          $ fossil clone https://github.com/me/my-repo.git
          $ cd my-repo
          $ fossil ui &
          ...hack on files in Git repo...
          $ fossil ci       # wrapper for "git commit -a && git push"

    We expand on this topic [below](#formats).

  +  **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.

The primary and most important purpose of Fossil is to support the
development of the [SQLite](https://sqlite.org/) project.  Legacy
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
Fossil 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.


[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/


## VCS as File Container
### <a id="container"></a>VCS as File Container

By "file container" we mean a archive or bundling format such as
a tarball or ZIP Archive.  One way to think about a VCS is as an
enhanced file container.  Existing file containers allow one to create
a single snapshot of a project time.  A VCS is the same except that
One way to think about a VCS is as a
enhanced file container.  You can use file container formats like tar and zip to create
a single snapshot of a project.  A VCS is the same except that
it allows one to store multiple snapshots.

Fossil-NG should have facilities to help to work as a simple file
Fossil-NG should have facilities that allow you to work with Fossil repositories in as simple a manner as traditional command-line file archiving tools like tar and zip. For example:
container like tar and zip.  One should be able to run commands like:

>
    fossil new new-repo.fossil Makefile README.md src/

That command will create a file container named "new-repo.fossil" that
contains the files "Makefile", "README.md", and all files under src/.
contains the files `Makefile`, `README.md`, and all files under `src/`.
This repository would be compact, and suitable for sending as an email
attachment, just like one would do with a tarball or ZIP archive.

The [SQLite Archiver](https://sqlite.org/sqlar/doc/trunk/README.md)
project shows how to build a file container using SQLite for storage.
Fossil-NG should include the capabilities of SQLite Archiver, though
the underlying file format will doubtless be more advanced so that
it can also support block-chain versioning.

Current Fossil provides web-page links and command-line operations for
generating a ZIP archive or tarball for a particular check-in.
Fossil-NG should continue to have that capability, but should also
be able to generate a single-checkin repository that serves as a
file container.


## Support For Multiple VCS Formats
### <a id="formats"></a>Support For Multiple VCS Formats

Fossil-NG should provide the ability to store artifacts in various
formats:

  1.   Git
  2.   Mercurial
  3.   Legacy Fossil
  4.   Fossil-NG

This is a generalization of the [Git-specific cases above](#git): in principle, [Fossil is not tied to a single file format][fff]. It is possible to encode a Fossil repository atop other substrates other than the current SQLite-based DB file format.

A repository that contains only Git-formatted artifacts should have the
capability to interoperate seamlessly with Git repositories.  This allows,
for example, a Fossil-NG user to clone and use a repository out of GitHub
while continuing to use the superior Fossil user interface.  It also
allows a Fossil server to answer clone/push/pull requests from legacy
Git clients.  The same symmetry applies to Mercurial and legacy Fossil.
︙
92
93
94
95
96
97
98


130
131
132
133
134
135
136
137
138







+
+
repositories that hosts all artifacts in the one format the the client
understands.

Converting artifacts from one format to another is an expensive computation -
too expensive to do on-the-fly.  However, it is conceivable that Fossil-NG
could be used to convert repositories between Git/Hg/Fossil formats as
an off-line operation.

[fff]:  /doc/trunk/www/fileformat.wiki